isFinite() Method

Syntax

Returns

True if value is or can be converted to a number; false if value evaluates to NaN, POSITIVE_INFINITY, or NEGATIVE_INFINITY.

Usage

The isFinite() method returns true if number is or can be converted to a number. If the parameter evaluates to NaN, number.POSITIVE_INFINITY, or number.NEGATIVE_INFINITY, the method returns false. For details on the number object, see NaN.