JavaScript Number NEGATIVE_INFINITY Property
Last Updated :
22 May, 2023
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.
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...