Tutorials Point


  JavaScript Basics
  JavaScript Objects
  JavaScript Advanced
  JS Useful References
  JS Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

Javascript Number - MAX_VALUE


previous next AddThis Social Bookmark Button


Advertisements

Description:

The Number.MAX_VALUE property belongs to the static Number object. This represents constants for the largest possible positive numbers that JavaScript can work with.

This constant has actual value 1.7976931348623157 x 10308

Syntax:

You can access this value using the following syntax:

var val = Number.MAX_VALUE;

Example:

Here is the example showing the usage of this property.

<html>
<head>
<script type="text/javascript">
<!--
function showValue()
{
   var val = Number.MAX_VALUE;

   alert("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>

This will produce following result:

Value of Number.MAX_VALUE : 1.7976931348623157 x 10308

To understand it in better way you can Try it yourself.



previous next Printer Friendly

Advertisements


  

Advertisements