Google News
logo
JavaScript - Quiz(MCQ)
1 .
Who is inventor of JavaScript ?
A)
John Resig
B)
Brendan Eich
C)
Rasmus Lerdorf
D)
Guido van Rossum

Correct Answer : Option (B) :  

Brendan Eich

2 .
JavaScript initial release date ?
A)
December 4, 1995
B)
December 9, 1995
C)
December 15, 1995
D)
December 21, 1995

Correct Answer : Option (A) :  

December 4, 1995

3 .
To insert a JavaScript into an HTML page, which tag is used?
A)
<script=’javascript’>
B)
<javascript>
C)
<script>
D)
<js>

Correct Answer : Option (C) :  

<script>

4 .
Where is the correct place to insert a JavaScript?
A)
The <head> section
B)
The <body> section
C)
The <footer> section
D)
All of The above

Correct Answer : Option (D) :  

All of The above

5 .
What is the correct syntax for referring to an external script called "xxx.js"?
A)
<script src="xxx.js"></script>
B)
<script href="xxx.js"></script>
C)
<a src="xxx.js"></a>
D)
<a href="xxx.js"></a>

Correct Answer : Option (A) :  

<script src="xxx.js"></script>

6 .
How can you add a comment in a JavaScript?
A)
<!--This is a comment-->
B)
'This is a comment
C)
//This is a comment
D)
/This is a comment

Correct Answer : Option (C) :  

//This is a comment

7 .
How to insert a comment that has more than one line?
A)
/* This comment has
   more than one line */
B)
//This comment has
   more than one line//
C)
<!-- This comment has
   more than one line -->
D)
// This comment has
   more than one line

Correct Answer : Option (A) :  

/* This comment has
   more than one line */

8 .
How do you write "Hello World" in ana alert box?
A)
alert("Hello World");
B)
msg("Hello World");
C)
msgBox("Hello World");
D)
alertBox("Hello World");

Correct Answer : Option (A) :  

alert("Hello World");

9 .
What language defines the behavior of a web page?
A)
HTML
B)
CSS
C)
XML
D)
JavaScript

Correct Answer : Option (D) :  

JavaScript

10 .
What is the alternate name for Java script?
A)
LimeScript 
B)
Both a and d
C)
ECMScript
D)
ECMAScript

Correct Answer : Option (D) :  

ECMAScript