JavaScript Infinity Property
Definition and Usage
Infinity property is used to store a value representing positive infinity.
Negative infinity is infinity minus a numeric value.
In Javascript, beyond 1.7976931348623157E + 10308 value is Infinity, a value less than -1.7976931348623157E + 103088 is infinitesimal.
Browser Support
All major browsers support Infinity property.
Examples
Examples
In this example, we will show when a number of circumstances beyond the infinity limitations occur:
<script>
var x=1.7976931348623157E+10308;
document.write(x + "<br>");
var y=-1.7976931348623157E+10308;
document.write(y);
</script>
var x=1.7976931348623157E+10308;
document.write(x + "<br>");
var y=-1.7976931348623157E+10308;
document.write(y);
</script>
Examples of the above output:
Infinity
-Infinity
-Infinity
try it"
JavaScript Global Functions