Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
Syntax
Number.isNaN(numValue)
Parameters
numValue
Required. The value to be tested against NaN.
Return Value
true if the value converted to the Number type is the NaN, otherwise false.
Remarks
You typically use this method to test return values from the parseInt and parseFloat methods.
Number.isNaN corrects problems with the global isNaN function. Number.isNaN only converts its argument to the type Number after comparing it with NaN. As a result, it returns true if and only if the argument passed in is exactly the same value as NaN. The global isNaN function converts its argument to the type Number before the comparison, which can lead to non-number values returning true, whereas they might not return true for Number.isNaN.
Requirements
Supported in Microsoft Edge (Edge browser). Also supported in Store apps (Microsoft Edge on Windows 10). See Version Information.
Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Not supported in Windows 8.1.
Applies To: Number Object
Example
// Returns true.
Number.isNaN(NaN);
Number.isNaN(Number.NaN);
Number.isNaN(0 / 0);
// Returns false.
Number.isNaN(100);
// Returns false.
// Strings are converted to numbers and return false.
Number.isNaN("100");
Number.isNaN("ABC");
Number.isNaN("10C");
Number.isNaN("abc123");

