TRAINING CATEGORIES
TRAINING PROGRAMS
let isTrue = true; let isFalse = false;
let value = "Hello"; let isTruthy = Boolean(value); // true let anotherValue = 0; let isFalsy = Boolean(anotherValue); // false
let x = 5; let y = 10; if (x < y) { console.log("x is less than y"); // Output: "x is less than y" }
let nonEmptyString = "Hello"; if (nonEmptyString) { console.log("This will be executed"); // Output: "This will be executed" }
let emptyString = ""; if (!emptyString) { console.log("This will be executed"); // Output: "This will be executed" }
let booleanObj = new Boolean(true); console.log(booleanObj.valueOf()); // Output: true
let value = null;
let x; console.log(x); // Output: undefined
We use cookies to make interactions with our websites and services easy and meaningful. Please read our Privacy Policy for more details.
AND GET