Home »
MCQs »
JavaScript MCQs
What is the output of the following JavaScript code?
26. What is the output of the following JavaScript code?
<script>
var a;
document.getElementById("demo").innerHTML = a+1;
</script>
- 0
- undefined
- 1
- NaN
Answer: D) NaN
Explanation:
The output of the above JavaScript code is: NaN