JavaScript POSITIVE_INFINITYProperty
Example
Return positive infinity:
Number.POSITIVE_INFINITY;
Output result:
Infinity
Try it yourself »
Definition and Usage
The POSITIVE_INFINITY property value represents positive infinity.
The POSITIVE_INFINITY property represents a value greater than Number.MAX_VALUE.
Using Number.POSITIVE_INFINITY
POSITIVE_INFINITY is a static property of the JavaScript Number object.
The calling syntax is: Number.POSITIVE_INFINITY.
Using a custom Number object x to access this property (x.POSITIVE_INFINITY) will return undefined:
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;
nOutput result:
Infinity
Try it yourself »
Other Extensions
JavaScript Number Object