Evaluates an argument to determine if it is not a number.
Core function
Syntax
isNaN( testValue )
Parameters
Parameter | Description |
---|---|
testValue | The value you want to evaluate. |
Description
isNaN is a top-level function and is not associated with any object.
On platforms that support NaN, the parseFloat and parseInt functions return NaN when they evaluate a value that is not a number. isNaN returns true if passed NaN, and false otherwise.
Examples
The following example evaluates floatValue to determine whether it is a number and then calls a function accordingly: