JavaScript POSITIVE_INFINITY property
Example
Returns positive infinity:
Number.POSITIVE_INFINITY;
Output result:
Infinity
Try it »
Definition and Usage
The POSITIVE_INFINITY property represents positive infinity.
The POSITIVE_INFINITY property represents a value greater than Number.MAX_VALUE.
Use Number.POSITIVE_INFINITY
POSITIVE_INFINITY is a static property of the JavaScript Number object.
It is called as: Number.POSITIVE_INFINITY.
Using a custom Number object x to call this property (x.POSITIVE_INFINITY) returns undefined:
Example
var x = 100;
x.NEGATIVE_INFINITY;
The output result of x:
undefined
Try it »
Browser support





All major browsers support the POSITIVE_INFINITY property.
Syntax
Number.POSITIVE_INFINITY;
Technical Details
| Return Value: | The numeric value: Infinity |
|---|---|
| JavaScript version: | 1.1 |
More examples
Example
Create a positive infinity:
var n=(Number.MAX_VALUE)*2;
n Output result:
Infinity
Try it »
JavaScript Number object