निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?
What will be the output of the following JavaScript code ?
<p id="demo"></p>
<script>
var js = 10;
js *= 5;
document.getElementById("demo").innerHTML = js;
</script>
A
10
B
15
C
5
D
50
Explanation
var js = 10;
js *= 5; // यह js = js * 5 के बराबर है, यानी 10 * 5 = 50
फिर यह value HTML के <p> टैग में दिखेगी:
html
Copy
Edit
<p id="demo">50</p>
In English:
The code multiplies js (which is 10) by 5, so the result is 50, and it's shown in the paragraph with id "demo".
Correct Answer: D) 50