Distinguish between null, undefined, and an empty string (“”).
Source Code
let a = null; // Explicitly nothing
let b; // Not assigned a value, thus undefined
let c = ""; // A string with no characters
console.log(a, b, c);
Distinguish between null, undefined, and an empty string (“”).
let a = null; // Explicitly nothing
let b; // Not assigned a value, thus undefined
let c = ""; // A string with no characters
console.log(a, b, c);