Using Number.NEGATIVE_INFINITY property to coding in Javascript/JS

This JavaScript tutorial explains how to use the Number property called NEGATIVE_INFINITY with syntax and examples.


In JavaScript, NEGATIVE_INFINITY is a static property of the Number object that is used to return the fee that represents bad infinity (ie: -Infinity). Because NEGATIVE_INFINITY is a property of the Number object, it must be invoked via the object referred to as Number.


In JavaScript, the syntax for the NEGATIVE_INFINITY property is:


Parameters or Arguments

There are no parameters or arguments for the NEGATIVE_INFINITY property.


The NEGATIVE_INFINITY property returns the value that represents terrible infinity which is -Infinity.


The NEGATIVE_INFINITY property is a property of the Number object and now not a range function. However, we have protected the NEGATIVE_INFINITY property inside our JS Number Methods area because you will most likely use this property in conjunction with the Number techniques observed in this section.


Let’s take a seem to be at an example of how to use the NEGATIVE_INFINITY property in JavaScript.

For example:


In this example, we have invoked the NEGATIVE_INFINITY property using the Number class.

We have written the output of the NEGATIVE_INFINITY property to the net browser console log, for demonstration purposes, to exhibit what the NEGATIVE_INFINITY property returns.

The following will be output to the web browser console log:


In this example, the NEGATIVE_INFINITY property lower back a fee of -Infinity which represents poor infinity in JavaScript.