Interesting JavaScript Results
NaN (Not a Number) is a special value in JavaScript, and even NaN is not equal to itself. console.log(NaN === NaN); // false An empty array is considered a truthy value. console.log(Boolean([])); // true The typeof null returns “object” in JavaScript, which is a long-standing bug in the language. console.log(typeof…
Interesting JavaScript Results NaN (Not a Number) is a special value in JavaScript, and even NaN is not equal to itself. console.log(NaN === NaN); // false An empty array is considered a truthy value. console.log(Boolean([])); // true The typeof null returns “object” in JavaScript, which is a long-standing bug in the language. console.log(typeof… web-development
Interesting JavaScript Results NaN Number special value JavaScript even NaN equal consolelogNaN NaN false empty array considered truthy value consolelogBoolean true typeof null return “object” JavaScript longstanding bug language consolelogtypeof… webdevelopment