JavaScript Number NEGATIVE_INFINITY
Examples
let x = Number.NEGATIVE_INFINITY;
Try it Yourself »
Create a negative infinity:
let n = (-Number.MAX_VALUE) * 2;
Try it Yourself »
Description
Number.NEGATIVE_INFINITY
returns negative infinity.
Number.NEGATIVE_INFINITY
is "a number lower than any other number".
See Also:
Number.NEGATIVE_INFINITY
NEGATIVE_INFINITY is a property of the JavaScript Number object.
You can only use it as Number.NEGATIVE_INFINITY.
Using x.NEGATIVE_INFINITY, where x is a variable, will return undefined:
Syntax
Number.NEGATIVE_INFINITY
Return Value
Type | Description |
A number | -Infinity |
Browser Support
Number.NEGATIVE_INFINITY
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.