Number.MIN_VALUE is the smallest possible positive number representable in JavaScript within float precision. It does not represent the most negative number, instead of that, it possesses the value of the smallest positive number which is closest to 0.
Syntax:
Number.MIN_VALUE
Return Value: It has approximately a value of 5E-324(>0). But in practice, the more precise value of Number.MIN_VALUE in Node.js and browsers is 2^-1074.
Note: As MIN_VALUE is a static property of the Number class, we should always use it as Number.MIN_VALUE instead of using as a property of the object created from the Number class ( static properties always belong to the class, not to the objects). So, if we create a Number object and try to access the MIN_VALUE property of the object, it will return undefined.
Let us look at some examples to see how to use this property:
Example 1: This example shows the use of the MIN_VALUE property.
Javascript
let num=100; console.log(Number.MIN_VALUE); console.log( "Check if it is greater than zero :" , Number.MIN_VALUE>0); |
Output:
5e-324 Check if it is greater than zero : true
Example 2: This example shows the use of the MIN_VALUE property.
Javascript
let num=100; console.log(num.MIN_VALUE); |
Output:
undefined
We have a complete list of Javascript Number methods, to check those please go through the JavaScript Number Complete Reference article.
Supported Browsers:
- Chrome 1 and above
- Edge 12 and above
- Firefox 1 and above
- Opera 3 and above
- Safari 1 and above
We have a complete list of JavaScript Number constructor, properties, and methods list, to know more about the numbers please go through that article.