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

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

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

number
string
object
null

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

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

4. Which operator will return false if two value are equal?

!
!=
!==
All of the above

5. What convenience does the following JavaScript code snippet provide?

let suc = function(a) a+1, yes = function() true, no = function() false;

Functional behaviour
Modular behaviour
No convenience
Shorthand expression

6. What is the purpose of the NamedNodeMap object?

Unordered collection of arrays
Unordered collection of elements
Unordered collection of nodes
Unordered collection of attributes

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

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

9. A ___________ has global scope which means it can be defined anywhere in your JavaScript code.

local variable
global variable
simple variable
complex variable

10. arrays always use numbered indexes.

Yes
No
Can be yes or no
Can not say

Results