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.NEGATIVE_INFINITY;
}
</script>

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
function myFunction()
{
document.getElementById(“demo”).innerHTML = Number.NEGATIVE_INFINITY;
}
</script>
a) -1000
b) -infinity
c) infinity
d) undefined

Answer: b
Explanation: The NEGATIVE_INFINITY property represents negative infinity. Negative infinity can be explained as something that is lower than any other number.

Join The Discussion