JavaScript NEGATIVE_INFINITY property
Example
Return negative infinity:
Number.NEGATIVE_INFINITY;
Output result:
-Infinity
Try it »
Definition and Usage
The NEGATIVE_INFINITY property represents negative infinity.
The NEGATIVE_INFINITY property represents a value smaller than Number.MIN_VALUE.
Using Number.NEGATIVE_INFINITY
NEGATIVE_INFINITY is a static variable of the JavaScript Number object.
Access it as: Number.NEGATIVE_INFINITY.
Accessing this property via a custom Number object x (x.NEGATIVE_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 NEGATIVE_INFINITY property
Syntax
Number.NEGATIVE_INFINITY;
Technical Details
| Return Value: | Negative infinity, returned on overflow. |
|---|---|
| JavaScript version: | 1.1 |
More examples
Example
Create a number equal to negative infinity:
var n=(-Number.MAX_VALUE)*2;
n Output result:
-Infinity
Try it »
JavaScript Number object