JavaScript NEGATIVE_INFINITYProperty

Number 对象参考手册JavaScript Number Object

Example

Return negative infinity:

Number.NEGATIVE_INFINITY;

Output:

-Infinity

Try it Yourself »

Definition and Usage

The NEGATIVE_INFINITY property represents negative infinity.

The NEGATIVE_INFINITY property represents a value less than Number.MIN_VALUE.


Use Number.NEGATIVE_INFINITY

NEGATIVE_INFINITY is a static variable of the JavaScript Number object.

The calling method is: Number.NEGATIVE_INFINITY.

Using a custom Number object x to call this property (x.NEGATIVE_INFINITY) will return undefined:

Example

var x = 100;
x.NEGATIVE_INFINITY;

x Output:

undefined

Try it Yourself »


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the NEGATIVE_INFINITY property.


Syntax

Number.NEGATIVE_INFINITY;

Technical Details

Return value: Negative infinity, returned when overflow occurs.
JavaScript Version: 1.1


More Examples

Example

Create a negative infinity number:

var n=(-Number.MAX_VALUE)*2;

nOutput:

-Infinity

Try it Yourself »


Number 对象参考手册JavaScript Number Object

Other Extensions