- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Javascript Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Javascript Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is true about variable naming conventions in JavaScript?
A - JavaScript variable names must begin with a letter or the underscore character.
Answer : C
Explanation
Both of the above options are correct.
Answer : A
Explanation
Yes! An anonymous function can be passed as an argument to another function.
Q 3 - Which built-in method calls a function for each element in the array?
Answer : C
Explanation
forEach() method calls a function for each element in the array.
Q 4 - Which built-in method returns the calling string value converted to lower case?
Answer : A
Explanation
toLowerCase() method returns the calling string value converted to lower case.
Q 5 - Which of the following function of Number object defines how many total digits to display of a number?
Answer : D
Explanation
toPrecision() − Defines how many total digits (including digits to the left and right of the decimal) to display of a number.
Q 6 - Which of the following function of String object returns the index within the calling String object of the last occurrence of the specified value?
Answer : A
Explanation
lastIndexOf() − Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found.
Q 7 - Which of the following function of String object returns the calling string value converted to upper case?
Answer : B
Explanation
toUpperCase() − Returns the calling string value converted to upper case.
Q 8 - Which of the following function of String object causes a string to be displayed as a subscript, as if it were in a <sub> tag?
Answer : D
Explanation
sub() − Causes a string to be displayed as a subscript, as if it were in a <sub> tag.
Q 9 - Which of the following function of Array object applies a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value?
Answer : C
Explanation
reduce() − Applies a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value.
Q 10 - Which of the following function of Array object applies a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value?
Answer : D
Explanation
reduceRight() − Applies a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value.