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 an advantage of using JavaScript?
Answer : D
Explanation
All of the above options are correct.
Q 2 - How can you get the total number of arguments passed to a function?
A - Using args.length property
Answer : B
Explanation
Using arguments.length property, we can get the total number of arguments passed to a 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 of the following code creates an object?
Answer : B
Explanation
var book = new Object(); creates an object.
Q 5 - Which of the following function of String object returns a number indicating the Unicode value of the character at the given index?
Answer : B
Explanation
charCodeAt() − Returns a number indicating the Unicode value of the character at the given index.
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 lower case?
Answer : B
Explanation
toLowerCase() − Returns the calling string value converted to lower case.
Q 8 - Which of the following function of String object causes a string to be displayed in the specified size as if it were in a <font size = 'size'> tag?
Answer : C
Explanation
fontsize() − Causes a string to be displayed in the specified size as if it were in a <font size = 'size'> tag.
Q 9 - Which of the following function of Array object creates a new array with all of the elements of this array for which the provided filtering function returns true?
Answer : C
Explanation
filter() − Creates a new array with all of the elements of this array for which the provided filtering function returns true.
Q 10 - Which of the following function of Array object adds one or more elements to the front of an array and returns the new length of the array?
Answer : A
Explanation
unshift() − Adds one or more elements to the front of an array and returns the new length of the array.