isNaN

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:

See also

Number.NaN, parseFloat, parseInt

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.