Description
The Infinity property is a numeric value that represents positive infinity. -Infinity is a numeric value that represents negative infinity.
Infinity is displayed when a number exceeds the upper limit of the floating point numbers, which is 1.7976931348623157E+10308.
-Infinity is displayed when a number exceeds the lower limit of the floating point numbers, which is -1.7976931348623157E+10308.
Examples
The following example shows the basic use of this property.
<script>
var x=1.7976931348623157E+10308;
document.write(x + "<br />");
var y=-1.7976931348623157E+10308;
document.write(y);
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|