Skip to content

Instantly share code, notes, and snippets.

View BennisonDevadoss's full-sized avatar
🎯
Focusing

Bennison_J BennisonDevadoss

🎯
Focusing
View GitHub Profile
// "Mangos", is a value. if you want to see this on a console.
console.log("Mangos"); // Mangos
console.log(23); // and here 23 is a value. 
let firstName = "Bennison"; 
console.log(firstName); // Bennison
let variable = "value";
console.log(variable) // value
let variable = "value"; // value
const variable = "value"
console.log(variable); //value
variable = "new value"; // This line will give an error "Uncaught TypeError: Assignment to constant variable"
var variable = "value"
console.log(variable) // value
variable = "New Value"
console.log(variable) // New Value
var variable = "string"
console.log(variable) // string
console.log(Boolean(undefined)) // false
console.log(Boolean(null)) // false
console.log(Boolean(NaN)) // false
console.log(Boolean(0)) // false
console.log(Boolean("")) // false
let firstName = "Bennison"
let lastName = undefined
if(lastName){
console.log(`Hello ${firstName} ${lastName}`);
}
else{
console.log(`Hello ${firstName}`); // Bennison
let a;
let total = 1 + 2;
let string = "value" + "value";
let multiply = 1 * 1
const variable = "value";
if(variable){
let newVariable = "New Value";
}
// 1. init code
export function setup() {
// 2. setup code
}
export default function (data) {
// 3. VU code
}
export function teardown(data) {
// 4. teardown code
}
let a = 10;
let b = 20;
let result = a > 0 && b > 10
console.log( result ) // true
// a > 0 is operand one -------> The condition is true
// b > 10 is operand two -------> The condition is true
// Here, The both conditions are same, So th AND Operator returns the true.