page-banner
WDP M2-R5.1 Quiz-3
Q 11. निम्नलिखित जावास्क्रिप्ट कोड स्निपेट का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following JavaScript code snippet?<pre><code><p id="demo"></p> var txt1 = "GyanXp_"; var txt2 = "Javascriptmcq"; document.getElementById("demo").innerHTML = txt1 + txt2;</code></pre>

A. error

B. GyanXp

C. undefined

D. GyanXp_javascriptmcq

Q 12. निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following JavaScript code?<pre><code><p id="demo"></p> <script> var js = 10; js *= 5; document.getElementById("demo").innerHTML = js; </script></code></pre>

A. 10

B. 50

C. 5

D. Error

Q 13. निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following JavaScript code?<pre><code>function compare() { int num = 2; char b = 2; if(a == b) return true; else return false; }</code></pre>

A. false

B. true

C. compilation error

D. runtime error

Q 14. निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following JavaScript code?<pre><code>function compare() { int a = 1; char b = 1; if(a.tostring() === b) return true; else return false; }</code></pre>

A. runtime error

B. Logical error

C. true

D. false

Q 15. निम्नलिखित जावास्क्रिप्ट फ़ंक्शन का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following JavaScript function?<pre><code><p id="demo"></p> <script> function javascript() { document.getElementById("demo").innerHTML = Math.abs(-7.25); } </script></code></pre>

A. -7.25

B. 7.25

C. -7

D. 7