NaN, or Not a Number, is a value that returns when impossible things are asked in arithmetic – like:
- divide zero by zero.
- or during the bad coercion
NaN (paradoxically named not a number) is a special floating-point value in the IEEE floating-point standard.
Not equal to itself
The IEEE floating-point standard requires that NaN must be treated as unequal to itself.
console.log(NaN === NaN); // false