What will be the output of the following JavaScript code? [code] <p id="demo"></p> <script> var x = 10; var y = "20"; var z = x + y; document.ge

Huyền Thu

New member
What will be the output of the following JavaScript code?
Code:
<p id="demo"></p>
<script>
var x = 10;
var y = "20";
var z = x + y;
document.getElementById("demo").innerHTML = z;
</script>
A. 30
B. 10 20
C. 1020
D. Error
 

Tìm kiếm

Back
Top