JavaScript Infinity Property
Complete Function Reference
Definition and Usage
The Infinity property is a numeric value that represents positive or negative infinity.
Infinity is
displayed when a number is higher than 1.7976931348623157E+10308, and -Infinity
is displayed when a number is lower than -1.7976931348623157E+10308.
Syntax
Tips and Notes
Note: Anything divided by Infinity is 0 and anything multiplied by
Infinity is Infinity.
Example
In this example we will show what happens if a number exceeds the infinity
limit:
<script type="text/javascript">
var t1=1.7976931348623157E+10308;
document.write(t1);
document.write("<br />");
var t2=-1.7976931348623157E+10308;
document.write(t2);
</script>
|
The output of the code above will be:
Try-It-Yourself Demos
Infinity
What happens if a number exceeds the infinity limit?
Complete Function Reference
 |

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