JavaScript MCQs – Multiple Choice Questions and Answers – Part 4
Multiple choice questions and answers (MCQs) on JavaScript to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as variables, functions, loops, objects, and more. This quiz will easily prepare anyone to pass their online test.
1. What is the output of : String.fromCharCode(65)
?
A 1
B A
C error
D false
2. What event do you use to perform something after the page has finished loading?
A onfinished
B onload
C onunload
D oncomplete
3. Which keyword catches all values except those specified?
A all
B any
C default
D otherwise
4. Which of the following is not a property of window object?
A document
B menu
C navigator
D history
6. DOM ____?
A is dedicated for JavaScript
B is a template engine
C describes the structure of the HTML or XML document
D cannot be manipulated by JavaScript
7. Which function does the reverse of split()?
A append()
B unite()
C join()
D concat()
8. Which declaration provides the value of a function?
A return
B cancel
C continue
D valueOf
9. Which property is object oriented?
A function
B if statement
C variable
D keyword
10. Which of the following IS NOT a valid function call?
A var x = display();
B display;
C x = display();
D display();