Module 1 JavaScript and Creating Web Page Section 4

Copa | Semester 2nd | Module 1 |  Section 4

1. How will JavaScript treat a number, when it is enclosed with double or single quotes?
जावास्क्रिप्ट एक नंबर को कैसे प्रदर्शित करेगा जब यह डबल या सिंगल कोट्स के साथ उपयोग हो?

... Answer is C) String

2. What will be the output for the following JavaScript code?
निम्नलिखित जावास्क्रिप्ट कोड के लिए आउटपुट क्या होगा?
var x = 13 +”03”
Alert(x);

... Answer is C) 1303

3. What will be the output, if the JavaScript code is executed.
जावास्क्रिप्ट कोड निष्पादित होने पर आउटपुट क्या होगा।
var x = 1324;
var y = new Number(1324);
if( x === y)
alert(“Yes”);
else
alert(“No”)

... Answer is D) Yes

4. What is the output of the following JavaScript code?
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या है?
var x = “ ITI “;
var y = “ GOVT “;
var o = y concat(x);
document.write(o);

... Answer is C) GOVTITI

5. What is the output of the following javascript code?
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या है?
var name = “ Kanya Kumari” ;
var x = name.substr(8,2);
document.write(x);

... Answer is B) ma

Section 1 Section 2 Section 3 Section 4

Post a Comment

If you have any doubts,Please let me know

Previous Post Next Post
close