In computing, NaN stands for Not a Number. It means the result of input is or unrepresentable. For example, division by zero in most Programming language returns NaN. Systematic use of NaN was introduced by the IEEE 754 in 1985, along with the other numbers such as infinities.
NaN == NaN or
NaN == other_value returns
=== also returns
false. You can use
isNaN(myVar) to check if a value is NaN. there is difference between two functions. the
true when the value is NaN when parsed to int. but
true when the value is currently NaN.
Number.isNaN('Hi!') // returns true because 'Hi!' in integer is NaN
isNaN('Hi!') // returns false because 'Hi!' is not NaN
References[change | change source]