Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
function myFunction()
{
document.getElementById(“demo”).innerHTML = Number.MAX_VALUE;
}
</script>

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
function myFunction()
{
document.getElementById(“demo”).innerHTML = Number.MAX_VALUE;
}
</script>
a) 1.7976931348623157e+308
b) 1.7976931348623157e+305
c) 1.7976931348623157e+307
d) error

Answer: a
Explanation: The MAX_VALUE property returns the largest number possible in JavaScript. This static property has a value of 1.7976931348623157e+308.

Join The Discussion