JavaScript Number.isFinite() Method
The Number.isFinite() static method checks whether a value is a finite number, without converting other types to numbers first.
Description
The Number.isFinite() static method returns true only if the value is a number that is neither Infinity, -Infinity nor NaN. Unlike the global isFinite(), it doesn't convert its argument, so Number.isFinite('5') is false.
It's useful for validating numeric input after conversion: Number.isFinite(Number(input)) is true only for real, finite numbers, rejecting empty results such as NaN as well as overflows to Infinity.
BigInts aren't of type number, so Number.isFinite(10n) is false. Like other static members of Number, it is called on the Number constructor itself, not on individual number values.
Syntax
Number.isFinite(value)Parameters
- valueThe value to check.
Return Value
true if the value is a finite number, otherwise false.
Example
Browser Support
The following information will show you the current browser support for the Number.isFinite() method. Hover over a browser icon to see the version that first introduced support for this method.
Desktop





Tablets & Mobile





