JavaScript MCQ Scripted Media Question #5042
MCQ Single Best Answer Easy

QWhat would the following JavaScript code produce?

<p id="demo"></p>
<script>
function myFunction() 
{
   document.getElementById("demo").innerHTML = 
   Number.POSITIVE_INFINITY;
}
</script>

ID: #5042 Scripted Media 301 views
Question Info
#5042Q ID
EasyDifficulty
Scripted MediaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 10000
  • B -infinity
  • C infinity
  • D error
Correct Answer: Option C

Explanation

The POSITIVE_INFINITY property represents a value that is higher than any other number.
The POSITIVE_INFINITY property represents a value that is greater than any other number.
POSITIVE_INFINITY is a property that represents a value that is higher than any other number.
The POSITIVE_INFINITY property represents a value that is beyond any other number.

Share This Question

Challenge a friend or share with your study group.