How To Use Number Object MAX_VALUE In JavaScript

In this article I am going to explain about Number Object MAX_VALUE Property In JavaScript.
  • 1464

Use MAX_VALUE Property in JavaScript

The number object MAX_VALUE property return the largest number in JavaScript.

This static property has a value of 1.7976931348623157e+308 and then represent as infinity.

All browsers support number object MAX_VALUE property.

Syntax

Number.MAX_VALUE;

Example

<!DOCTY1PE html>

<html>

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

 

<p id="demo">Display the largest possible number in JavaScript.</p>

 

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

 

<script type="text/javascript">

    function myFunction()

    {

        document.getElementById("demo").innerHTML = Number.MAX_VALUE;

    }

</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

© 2013 dotNetheaven. All rights reserved.