JavaScript Number - MAX_VALUE
Advertisements
Description
The Number.MAX_VALUE property belongs to the static Number object. It represents constants for the largest possible positive numbers that JavaScript can work with.
The actual value of this constant is 1.7976931348623157 x 10308
Syntax
The syntax to use MAX_VALUE is −
var val = Number.MAX_VALUE;
Example
Try the following example to learn how to use MAX_VALUE.
Live Demo<html> <head> <script type = "text/javascript"> <!-- function showValue() { var val = Number.MAX_VALUE; document.write ("Value of Number.MAX_VALUE : " + val ); } //--> </script> </head> <body> <p>Click the following to see the result:</p> <form> <input type = "button" value = "Click Me" onclick = "showValue();" /> </form> </body> </html>
Output
javascript_number_object.htm
Advertisements