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

3. Consider the following JavaScript statement containing regular expressions and check if the pattern matches?

var text = "lestfindcourse: 1, 2, 3"; 
var pattern = /d+/g;

text==pattern
text.equals(pattern)
text.test(pattern)
pattern.test(text)

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

5. The W3C DOM standard is separated into _____ different parts

1
2
3
4

6. Spaces and line breaks are not important.

TRUE
FALSE
Can be true or false
Can not say

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

< body>
< form name="register">
Enter username < input value="John" id="name" name="username">
< /form>
< /body>

document.register.name.value
document.getElementById ("name").value
document.getElementByName ("name").value
None of the above

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

var package;
console.log("Package: " + package)
console.log("Amount: " + amount);

Package: null; Amount: null;
Package: undefined; Amount: undefined;
Package: null; An ReferenceError is thrown saying amount is not defined;
Package: undefined; An ReferenceError is thrown saying amount is not defined;

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

continue
break
loop
return

10. JavaScript is untyped language.

Yes
No
Can be yes or no
Can not say

Results