JavaScript isFinite() Function
Complete Function Reference
Definition and Usage
The isFinite() function is used to check if a value is a finite number.
Syntax
Parameter |
Description |
number |
Required. The value to be tested |
Example
In this example we use isFinite() to check for finite numbers:
<script type="text/javascript">
document.write(isFinite(123)+ "<br />");
document.write(isFinite(-1.23)+ "<br />");
document.write(isFinite(5-2)+ "<br />");
document.write(isFinite(0)+ "<br />");
document.write(isFinite("Hello")+ "<br />");
document.write(isFinite("2005/12/12")+ "<br />");
</script>
|
The output of the code above will be:
true
true
true
true
false
false
|
Try-It-Yourself Demos
isFinite()
How to use isFinite().
Complete Function Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|