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: 

Javascript




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. 

Javascript




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


Output:

-Infinity

Supported Browsers: 

  • Chrome 1 and above
  • Edge 12 and above
  • Firefox 1 and above
  • Opera 3 and above
  • safari 1 and above

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.

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, zambiatek Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button