X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

JavaScript Infinity Property

Function Reference JavaScript Global Functions

Example

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

var x = 1.7976931348623157E+10308;
var y = -1.7976931348623157E+10308;
var res = x + "<br>" + y;

The result of res 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.7976931348623157E+10308.

-Infinity is displayed when a number exceeds the lower limit of the floating point numbers, which is -1.7976931348623157E+10308.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The Infinity property is supported in all major browsers.


Technical Details

JavaScript Version: 1.3


Function Reference JavaScript Global Functions

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook