Javascript Programming Quiz


Play this Javascript quiz that will help you to excel in Javascript certification exams, placements etc. This Javascript programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This Javascript programming test enables you to assess your knowledge of Javascript programming.

Take the Free Practice Test



Javascript MCQs

Practice Javascript MCQ Questions, which will help you to clear your JS related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

Javascript Quiz

Try Free Javascript Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

Javascript Quiz

1. _________ standard model for all document types.

Core DOM
XML DOM
HTML DOM
None of the above

2. What does the following JavaScript code snippet do?

data.sort(function(a,b),b-a);

Sort in the alphabetical order
Sort in the chronological order
Sort in reverse alphabetical order
Sort in reverse numerical order

3. What is the code required to delete all weight tags?

delete weight(pt).all;
delete pt.element[all];
delete pt;
delete pt..weight;

4. What will be the output of the following JavaScript code?

< p id="demo">< /p>
< script>
var a = 20;
var b = "30";
var c = a + b;
document.getElementById ("demo").innerHTML = c;
< /script>

50
20+30
2030
error

5. What will be the output of the following JavaScript code?

function myfun()
{
var a = "";
document.getElementById ("demo").innerHTML = Boolean(a);
}

true
false
error
undefined

6. The capability to store one object inside another object known as?

Encapsulation
Aggregation
Inheritance
Polymorphism

7. _______ extracts a part of a string and returns the extracted part in a new string.

substring()
substr()
strlen()
slice()

8. If an operator is NaN or converts to NaN, what wil comparison operator always returns ?

True
False
Undefined
NAN

9. Which of the following true about JavaScript variable?

JavaScript variable names are case-sensitive
JavaScript variable names should not start with a numeral
You should not use any of the JavaScript reserved keywords as a variable name.
All of the above

10. What will be the output of the following JavaScript code?

< p id="demo">< /p>
< script>
var a = 20;
var b = "30";
document.getElementById ("demo").innerHTML = x + y;
< /script>

50
20+30
2030
error

Results