JavaScript - POSITIVE_INFINITY Number Object

Last Updated Jul 29, 2015, 07:00:14 PM





The JavaSctipt POSITIVE_INFINITY property represents the positive Infinity value.

The value of Number.POSITIVE_INFINITY is the same as the value of the global object's Infinity property..


Syntax

Property Attrinbutes
Writable no
Enumerable no
Configurable no



Example

In the above example, the variable myNumber is assigned a value that is larger than the maximum value. When the if statement executes, myNumber has the value Infinity, so myNumber is set to a more manageable value before continuing.


Try It Now


Other JavaScript Number Object Properties you might want to learn

MAX_VALUE

MIN_VALUE

NEGATIVE_INFINITY



Browser compatibility

Feature
POSITIVE_INFINITY Yes Yes Yes Yes Yes Yes Yes





Sources and Credits

The source of the content has been referred and updated with Mozilla Developer Network and W3C Organization

Last Updated Jul 29, 2015, 07:00:14 PM