User Guide
Global Functions 55
Example
The following example shows return values for
isFinite:
isFinite(56)
// returns true
isFinite(Number.POSITIVE_INFINITY)
//returns false
isNaN function
isNaN(expression:Object) : Boolean
Evaluates the parameter and returns true if the value is NaN(not a number). This function is
useful for checking whether a mathematical expression evaluates successfully to a number.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
expression:Object - A Boolean, variable, or other expression to be evaluated.
Returns
Boolean - A Boolean value.
Example
The following code illustrates return values for the
isNaN() function:
trace( isNaN("Tree") );
// returns true
trace( isNaN(56) );
// returns false
trace( isNaN(Number.POSITIVE_INFINITY) )
// returns false