The MIN_VALUE
property returns the smallest number possible in JavaScript.
This static property has a value of 5e-324.
MIN_VALUE is a static property of the JavaScript Number object. We can only use it as Number.MIN_VALUE.
MIN_VALUE |
Yes | Yes | Yes | Yes | Yes |
Number.MIN_VALUE
A Number, 5e-324
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {<!--from ww w .j a v a 2 s . c o m-->
var x = 100;
document.getElementById("demo").innerHTML = x.MIN_VALUE;
}
</script>
</body>
</html>
The code above is rendered as follows:
The following code shows how to get the smallest number possible in JavaScript.
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {<!--from w ww .ja v a 2 s. c om-->
document.getElementById("demo").innerHTML = Number.MIN_VALUE;
}
</script>
</body>
</html>
The code above is rendered as follows: