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. What among the following is an appropriate when an event occurs when the user clicks on an element?

onclick
onchange
onkeyup
onblur

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

223.123
22.123
223.12
2.2

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

console.log( typeof( '5' + 5))

number
string
object
null

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

5. Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?

o(x,y);
o.m(x) && o.m(y);
m(x,y);
o.m(x,y);

6. Consider the below code:
Identify the correct code in order to fetch the value entered in username text field?

< body>
< form name="login">
Enter Your Name< input value="Akash" id="p_name" name="uname">
< /form>
< /body>

document.login.uname.value
document.getElementById ("p_name").value
document.getElementByName ("name").value
Both A and B

7. The inner frame within a top-level window can be referred to as _____________

parent(parent)
parent.parent
parent*parent
parent/parent

8. Which of the following is a JavaScript data type?

null
undefined
object
All of the above

9. what will be the output of below code?

const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
console.log (event.toLocaleString('en-IN', { timeZone: 'UTC' }));

20/12/2012, 3:00:00
12/20/2012, 3:00:00
20/12/2012, 3:00:00 am
2012/12/20, 3:00:00 am

10. The ________ escape character turns special characters into string characters

\
/
|
#

Results