Truthy & Falsy Values
What is the result of Boolean(NaN) in JavaScript?
The result of Boolean(NaN) is false. NaN (Not a Number) is one of the six falsy values in JavaScript, alongside false, 0, '' (empty string), null, and undefined. When the Boolean() function is used for explicit conversion to a boolean, it returns false for all falsy values and true for all other values. NaN is a special numeric value that represents an invalid or unrepresentable mathematical operation, such as the square root of a negative number. Despite being categorized as a number type (typeof NaN returns 'number'), it's falsy in boolean contexts.