You can always press Enter⏎ to continue
Java Script Quiz
1
Instructions For Quiz
This Mock Test has 10 Questions
Each Question is of 1 marks so total 10 marks
Multiple Choice Questions(MCQ) with only ONE valid answer
Previous
Next
Submit
Press
Enter
2
Email
*
This field is required.
Enter Your Best Email
Previous
Next
Submit
Press
Enter
3
1) Which HTML attribute is used to define inline styles?
*
This field is required.
Class
Style
Font
All of above
Previous
Next
Submit
Press
Enter
4
2) What is the correct place to insert a JavaScript?
*
This field is required.
The "head" section
The "body" section
Both the "head" section and the "body" section
All of the above
Previous
Next
Submit
Press
Enter
5
3) How do you write "Hello World" in an alert box?
*
This field is required.
alert ("Hello World");
alertBox ("Hello World");
msgBox("Hello World");
msg("Hello World");
Previous
Next
Submit
Press
Enter
6
4) How you can create a function in JavaScript?
*
This field is required.
function = myFunction()
function myFunction()
function:myFunction()
Previous
Next
Submit
Press
Enter
7
5) How you can add comment in JavaScript?
*
This field is required.
'comment
//comment
None of the above
Previous
Next
Submit
Press
Enter
8
6) How you can declare array in JavaScript?
*
This field is required.
var size = [ "round", "rectangle", "square"]
var size = ( "round", "rectangle", "square")
var size ( "round", "rectangle", "square")
Previous
Next
Submit
Press
Enter
9
7) What is "this" keyword is used for in JavaScript?
*
This field is required.
To refer to the object on which method is being invoked
To refer to an object in the function
All of the above
Previous
Next
Submit
Press
Enter
10
8) What does the parseFloat() method does in JavaScript?
*
This field is required.
It returns number as a numbe
It returns a string, with a number written with a specified length
It parses a string and returns a number
It returns number as a string
Previous
Next
Submit
Press
Enter
11
9) To access and HTML element, what method does the JavaScript uses?
*
This field is required.
toExponential()
element.addEventListener(event, function, useCapture)
document.getElementById(id) method
Previous
Next
Submit
Press
Enter
12
10) Which of the following is NOT correct for the JavaScript
*
This field is required.
You need a compiler to compile the scripts of JavaScript
JavaScript is totally different from Java
JavaScript can be embedded within HTML
A file containing JavaScript can be viewed in a local browser with JavaScript enabled
Previous
Next
Submit
Press
Enter
Should be Empty:
Question Label
1
of
12
See All
Go Back
Submit