Regarding for Using NEGATIVE_INFINITY in JavaScript

Hello Everyone, I am new here and I want to know about NEGATIVE_INFINITY in JavaScript. I am learning javascript and I have one doubt NEGATIVE_INFINITY is a static property in JS that results? Can anyone explain me with some examples?

Refer this website:

1 Like

NEGATIVE_INFINITY is a static property of the JavaScript Number object.

You can only use it as Number.NEGATIVE_INFINITY.

Negative infinity can be explained as something that is lower than any other number.

To know more about this, you can visit here:

1 Like

Thanks for your suggestions! It will help me.

Negative infinity is something that is lower than any other number . This means that no other number is lesser than this value. In JavaScript negative infinity is a constant value which is used to represent a value which is the lowest available .

var x = 500;

returned "undefined"

This works great in JavaScript because any value compared to Math.NEGATIVE_INFINITY will be greater.

In other languages like C++, it’s common to use the minimum value of an integer, float, etc.