Open In App

JavaScript Number NEGATIVE_INFINITY Property

In JavaScript, NEGATIVE_INFINITY is a property of a number object which represents negative infinity (-Infinity). It can be explained as a number that is lower than any other number. It is a Read-Only property. 

Syntax: NEGATIVE_INFINITY is a static property of the NUMBER object and hence is always used with reference to it



Number.NEGATIVE_INFINITY

Return Value: It returns -Infinity.

Example 1: 






let num=100;
console.log(num.NEGATIVE_INFINITY);
console.log(Number.NEGATIVE_INFINITY);

Output:

undefined
-Infinity

Example 2: The following program shows how any number multiplied with negative infinity is negative infinity itself. 




let num=100*Number.NEGATIVE_INFINITY;
console.log(num);

Output:

-Infinity

Supported Browsers: 

We have a Cheat Sheet on Javascript Numbers where we covered all the important topics of Javascript to check those please go through JavaScript Number Complete Reference.

Article Tags :