The function Number.isNaN()
- is a static function on
Number
returns false
for any not-Number type
- like null
- like a string
- like an object
different to the global isNaN
function (specified in ES1)
- an object gets converted to a Number before the check, and returns true therefore
- a string gets converted to a Number first, and returns true therefore (even though its not
NaN
)
for real Numbers
- like 0
- or Infinity (+∞)
- or the biggest Number (9007199254740991 (2^53−1))
- or a decimal number
returns true for
- exactly
NaN
- the result of zero divided by zero
- something which seems not to be a number
Links
Description of `Number.isNaN` in the specification.
Description of `Number.MAX_SAFE_INTEGER` in the spec.
Description of `Number.POSITIVE_INFINITY` in the spec.
The (old) global `isNaN` function, that behaves a bit different.
The place where `Math.PI` is specified.