JavaScript Infinity Property
Example
Display a number that exceeds the limit of a floating point number:
1.7976931348623157E+10308 + "<br>" + -1.7976931348623157E+10308;
Try it Yourself »
Definition and Usage
Infinity 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.797693134862315E+308.
-Infinity is displayed when a number exceeds the lower limit of the floating point numbers, which is -1.797693134862316E+308.
Browser Support
Property | |||||
---|---|---|---|---|---|
Infinity | Yes | Yes | Yes | Yes | Yes |
Technical Details
JavaScript Version: | ECMAScript 1 |
---|