JavaScript Infinity Property

Definition and Usage

Infinity It is a numerical representation of positive infinity.

-Infinity It is a numerical representation of negative infinity.

When the number exceeds the upper limit of floating-point numbers, that is, 1.797693134862315E+308, it displays Infinity.

When the number exceeds the lower limit of floating-point numbers, that is, -1.797693134862316E+308, it displays -Infinity.

Example

Display numbers exceeding the floating-point number limit:

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

Try It Yourself

Technical Details

JavaScript Version: ECMAScript 1

Browser Support

Properties Chrome Edge Firefox Safari Opera
Infinity Support Support Support Support Support