JavaScript Basics
JavaScript Objects
JavaScript Advanced
JS Useful References
JS Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Javascript Number - MAX_VALUE
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.
|
|
|