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. Variables are declared with the _______ keyword.

this
int
var
new

2. _________ standard model for all document types.

Core DOM
XML DOM
HTML DOM
None of the above

3. Which statement required if you want to return a value from a function?

continue
break
loop
return

4. A linkage of series of prototype objects is called as :

prototype stack
prototype chain
prototype class
prototypes

5. If var A={B:3, C:5}, how to use the delete operator to delete one of the properties of an object.

delete
delete A
delete A.B
delete A[0]

6. What will be printed in the console on execution of the below code?

var materials = [
'Table',
'Chair',
'Boxes',
'Press'
];

console.log(materials.map (material => material.length));

[5,5,5,5]
[5]{4}
[5]
Both A and B

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

function myfun() 
{
document.getElementById ("demo").innerHTML = Boolean(15.00 === 15);
}

true
false
error
0

8. The ________ operator in JavaScript returns "object" for arrays.

and
or
not
typeof

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

int x=0;
for(x;x<10;x++);
console.log(x);

0
9
10
error

10. What will be the output of the below code?

class Rect {
constructor(h, w) {
this.height = h;
this.width = w;
}
get foo() {
return this.foo();
}
foo() {
return this.height * this.width;
}
}

const sq = new Rect(5, 20);
console.log(sq.foo());

this.height * this.width
100
Reference Error
5*20

Results