JavaScript Global method: isFinite()
[this page | pdf | back links]
The JavaScript
Global
isFinite() method indicates
whether a number is a finite legal number. It returns true if the value is a finite number, otherwise returns false.
It
has the following syntax with the following parameters:
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 DOM (and BOM)