Number.isFinite Function (Number) (JavaScript)

Returns a Boolean value that indicates whether a value is a finite number.

Syntax

Number.isFinite(numValue)   

Return Value

false if the value is NaN, +∞, or -∞; otherwise true.

Remarks

Example

// Returns true  
Number.isFinite(100)  
Number.isFinite(-100)  
Number.isFinite(100 / 3)  

// Returns false  
Number.isFinite(Number.NaN)  
Number.isFinite(Infinity)  
Number.isFinite("100")  

Requirements

Supported in Microsoft Edge (Edge browser). Also supported in Store apps (Microsoft Edge on Windows 10). See Version Information.
Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Not supported in Windows 8.1.

Applies To: Number Object