Q 11.
निम्नलिखित जावास्क्रिप्ट कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of the following JavaScript code snippet?
var txt1 = "GyanXp_";
var txt2 = "Javascriptmcq";
document.getElementById("demo").innerHTML = txt1 + txt2;
var txt1 = "GyanXp_";
var txt2 = "Javascriptmcq";
document.getElementById("demo").innerHTML = txt1 + txt2;A. error
B. GyanXp
C. undefined
D. GyanXp_javascriptmcq
Q 12.
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?
What will be the output of the following JavaScript code?
var js = 10;
js *= 5;
document.getElementById("demo").innerHTML = js;
var js = 10;
js *= 5;
document.getElementById("demo").innerHTML = js;
A. 10
B. 50
C. 5
D. Error
Q 13.
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?
What will be the output of the following JavaScript code?function compare() {
int num = 2;
char b = 2;
if(a == b)
return true;
else
return false;
}
function compare() {
int num = 2;
char b = 2;
if(a == b)
return true;
else
return false;
}A. false
B. true
C. compilation error
D. runtime error
Q 14.
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?
What will be the output of the following JavaScript code?function compare() {
int a = 1;
char b = 1;
if(a.tostring() === b)
return true;
else
return false;
}
function compare() {
int a = 1;
char b = 1;
if(a.tostring() === b)
return true;
else
return false;
}A. runtime error
B. Logical error
C. true
D. false
Q 15.
निम्नलिखित जावास्क्रिप्ट फ़ंक्शन का आउटपुट क्या होगा?
What will be the output of the following JavaScript function?
function javascript() {
document.getElementById("demo").innerHTML = Math.abs(-7.25);
}
function javascript() {
document.getElementById("demo").innerHTML = Math.abs(-7.25);
}
A. -7.25
B. 7.25
C. -7
D. 7