JavaScript Number.NEGATIVE_INFINITY

The value of NEGATIVE_INFINITY is the same as the negative of a global object's Infinity property. It is the value that is lower than any number in JavaScript.

It is a non-writable, non-enumerable, and non-configurable property.

The syntax to access the NEGATIVE_INFINITY constant is:

Number.NEGATIVE_INFINITY

NEGATIVE_INFINITY is accessed using the Number class name.


Example: Using Number.NEGATIVE_INFINITY

value = Number.NEGATIVE_INFINITY;
console.log(value); // -Infinity

Output

-Infinity

Note: JavaScript displays the NEGATIVE_INFINITY value as -Infinity.


Recommended Reading:

Did you find this article helpful?

Your builder path starts here. Builders don't just know how to code, they create solutions that matter.

Escape tutorial hell and ship real projects.

Try Programiz PRO
  • Real-World Projects
  • On-Demand Learning
  • AI Mentor
  • Builder Community