Computer >> Computer tutorials >  >> Programming >> Javascript

What is the minimum value represented by Number object in JavaScript?


The smallest possible value a number in JavaScript can have 5E-324. 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. 

Example

You can try to run the following code to get the minimum value represented by Number object −

Live Demo

<html>
   <head>
      <script>
         <!--
            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>