Using Number.POSITIVE_INFINITY property to coding in Javascript/JS

This JavaScript tutorial explains how to use the Number property known as POSITIVE_INFINITY with syntax and examples.


In JavaScript, POSITIVE_INFINITY is a static property of the Number object that is used to return the fee that represents high quality infinity (ie: Infinity). Because POSITIVE_INFINITY is a property of the Number object, it should be invoked through the object referred to as Number.


In JavaScript, the syntax for the POSITIVE_INFINITY property is:


Parameters or Arguments

There are no parameters or arguments for the POSITIVE_INFINITY property.


The POSITIVE_INFINITY property returns the fee that represents fantastic infinity which is Infinity.


The POSITIVE_INFINITY property is a property of the Number object and no longer a number function. However, we have blanketed the POSITIVE_INFINITY property inside our JS Number Methods part because you will most in all likelihood use this property in conjunction with the Number strategies discovered in this section.


Let’s take a appear at an example of how to use the POSITIVE_INFINITY property in JavaScript.

For example:


In this example, we have invoked the POSITIVE_INFINITY property the use of the Number class.

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

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


In this example, the POSITIVE_INFINITY property returned a cost of Infinity which represents high quality infinity in JavaScript.