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. JavaScript also defines _______ trivial data types.

1
2
3
4

2. What will be printed in the console on execution of the following JS code:

var array = [2, 4, 6, 7, 8, 10];
var myArr= array.filter(v => v / 2 === 0);

console.log(myArr);

myArr
[2, 4, 6, 7, 8, 10]
[2, 4, 6, 8, 10]
[7]

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

function fun_range(int l)
{
int p=2;
for(int x=0;x {
console.log(p);
}
}
range(4);

2
2222
4
error

4. 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

5. Which of the following string will match the RegEx "((d).(dd))$"?

223.123
22.123
223.12
2.2

6. What among the following is an appropriate when an event occurs when the user clicks on an element?

onclick
onchange
onkeyup
onblur

7. The ________ operator is used to create an instance of an object.

this
self
find
new

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

True
False
Undefined
NAN

9. Identify the correct syntax to create a JavaScript object for Employee with property empid, empName?

function Ticket(from,to,pName){
this.from=from;
this.to=to;
this.pName= pName;
}

var ticket=new Ticket( "Udaipur","Pune","Raj" );

var employee=new Object(); employee.empid=20; employee.empName="John";
var employee ={id:2001,empName:"John"};
var employee=Employee(); employee.empid=20; employee.empName="John";
Both A and C

10. JavaScript provides a special constructor function called Object() to build the object.

TRUE
FALSE
Can be true or false
Can not say

Results