Q. What is the output of the following JavaScript code?

Code:
<script>
	var a;
	document.getElementById("demo").innerHTML = a+1;
</script>
  • (A) 0
  • (B) undefined
  • (C) 1
  • (D) NaN
πŸ’¬ Discuss
βœ… Correct Answer: (D) NaN

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
217
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
92%
Success Rate