🔢NaN

not a number.

( non-configurable, non-writable global object property )

  • a property of the global object. (that is, a variable in global scope).

  • equivalent to Number.NaN.

NaN is the only value that doesn't equal to itself

// ⭐️ `NaN` is the ONLY ONE that doesn't equal to itself.
NaN === NaN,            // false❗️
NaN !== NaN,            // true❗️

// equivalent forms
Number.isNaN(x) === (x !== x)

trichotomy lawa < b, a = b, a > b doesn't apply to NaN

3 <  NaN,      // false❗
3 == NaN,      // false❗
3 >  NaN,      // false❗

Last updated