How To Use Number Object NEGATIVE_INFINITY In JavaScript

In this article I am going to explain about Number Object NEGATIVE_INFINITY Property In JavaScript.
  • 2184

Use NEGATIVE_INFINITY Property in JavaScript

The NEGATIVE_INFINITY property returns negative infinity.

This property is represent the smallest number of 0 (less then 0).

All browsers support number object NEGATIVE_INFINITY property.

Syntax

Number.NEGATIVE_INFINITY;

Example

<!DOCTYPE html>

<html>

<body style ="background-color:Red">

 

<p id="demo">Display negative infinity.</p>

 

<button onclick="myFunction()">Cliack here</button>

 

<script type="text/javascript">

    function myFunction()

    {

        var x = document.getElementById("demo");

        x.innerHTML = Number.NEGATIVE_INFINITY;

    }

</script>

 

</body>

</html>

Output1

op1.jpg

output2

 op2.jpg

Further Readings

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.