Jul 5, 2024
NN BB SS U
NN : Null, NumberBB : Boolean, BigIntSS : String, SymbolU: Undefinedlet a = null;
let b = 42; // number
let c = true; // boolean
let d = BigInt(567); // BigInt
let e = "Harry"; // string
let f = Symbol("I am a nice symbol"); // symbol
let g = undefined; // undefined
console.log(a, b, c, d, e, f, g);
console.log(typeof d); // BigInt
null vs undefined:
null: Explicitly signifies no value.undefined: Default state of a variable that has not been assigned a value.const item = {
"Harry": true,
"Shubh": false,
"Lovish": 67,
"Rohan": undefined
};
console.log(item["Harry"]); // true
console.log(item["Rohan"]); // undefined
console.log(item["Shubh"]); // false
NN BB SS UNext Steps: More detailed exploration of symbols and BigInt in future videos.