JavaScript Number method: isFinite()
[this page | pdf | back links]
The isFinite() method (of the JavaScript
Number
object) returns true if value is
a finite number, otherwise returns false.
It
has the following syntax with the following parameters:
Number.isFinite(x)
|
Parameter
|
Required / Optional
|
Description
|
|
x
|
Required
|
Input parameter
|
The Number.isFinite method is subtly
different to the global isFinite
function. The latter coerces a value to a number before testing it, whilst the
former does not. So, Number.isFinite("4.3")
returns false,
whilst isFinite("4.3")
returns true.
NAVIGATION LINKS
Contents | Prev | Next | JavaScript Numbers and Math