isNaN()

Availability

Flash Player 5.

Usage

isNaN(expression)

Parameters

expression A Boolean, variable, or other expression to be evaluated.

Returns

A Boolean value.

Description

Function; evaluates the parameter and returns true if the value is not a number (NaN), indicating the presence of mathematical errors.

Example

The following code illustrates return values for the isNaN function.

isNaN("Tree")

// returns true

isNaN(56)

// returns false

isNaN(Number.POSITIVE_INFINITY)
// returns false

See also

NaN, Number.NaN