Javascript - Number NEGATIVE_INFINITY Property

The NEGATIVE_INFINITY property represents negative infinity.

Description

The NEGATIVE_INFINITY property represents negative infinity.

NEGATIVE_INFINITY is a static property of the JavaScript Number object. You can only use it as Number.NEGATIVE_INFINITY.

Syntax

Number.NEGATIVE_INFINITY;

Return

The numeric value: -Infinity

Example

The value of x will be:

Demo

var x = 100;
console.log(x.NEGATIVE_INFINITY);/*  w w w  .j  ava2s .  c o  m*/

//Return negative infinity:

console.log(Number.NEGATIVE_INFINITY);

//Create a negative infinity:

//create a negative infinity.
var n = (-Number.MAX_VALUE) * 2;
console.log(n);

Result