THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

JavaScript Infinity Property

Function Reference JavaScript Global Functions

Example

Display a number that exceeds the limit of a floating point number:

1.7976931348623157E+10308 + "<br>" + -1.7976931348623157E+10308;

The result will be:

Infinity
-Infinity
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: 1.3

Function Reference JavaScript Global Functions