JavaScript Number - MIN_VALUE


Advertisements

Description

The Number.MIN_VALUE property belongs to the static Number object. It represents constants for the smallest possible positive numbers that JavaScript can work with.

This constant has actual value 5 x 10-324

Syntax

The syntax to use MIN_VALUE is −

var val = Number.MIN_VALUE;

Example

Try the following example.

<html>
   <head>      
      <script type = "text/javascript">
         <!--
            function showValue() {
               var val = Number.MIN_VALUE;
               alert("Value of Number.MIN_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