• JavaScript Video Tutorials

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.

Questions and Answers

Answer : C

Explanation

Both of the above options are correct.

Q 2 - Which of the following is a valid type of function javascript supports?

A - named function

B - anonymous function

C - Both of the above.

D - None of the above.

Answer : C

Explanation

A function in JavaScript can be either named or anonymous.

Q 3 - Which built-in method removes the last element from an array and returns that element?

A - last()

B - get()

C - pop()

D - None of the above.

Answer : C

Explanation

pop() method removes the last element from an array and returns that element.

Q 4 - Which built-in method returns the string representation of the number's value?

A - toValue()

B - toNumber()

C - toString()

D - None of the above.

Answer : C

Explanation

toString() method returns the string representation of the number's value.

Q 5 - Which of the following function of Boolean object returns a string containing the source of the Boolean object?

A - toSource()

B - valueOf()

C - toString()

D - None of the above.

Answer : A

Explanation

toSource() − Returns a string containing the source of the Boolean object; you can use this string to create an equivalent object.

Q 6 - Which of the following function of String object splits a String object into an array of strings by separating the string into substrings?

A - slice()

B - split()

C - replace()

D - search()

Answer : B

Explanation

split() − Splits a String object into an array of strings by separating the string into substrings.

Q 7 - Which of the following function of String object returns the primitive value of the specified object.

A - toLocaleUpperCase()

B - toUpperCase()

C - toString()

D - valueOf()

Answer : D

Explanation

valueOf() − Returns the primitive value of the specified object.

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?

A - sup()

B - small()

C - strike()

D - sub()

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 calls a function for each element in the array?

A - concat()

B - every()

C - filter()

D - forEach()

Answer : D

Explanation

forEach() − Calls a function for each element in the array.

Q 10 - Which of the following function of Array object reverses the order of the elements of an array?

A - reverse()

B - push()

C - reduce()

D - reduceRight()

Answer : A

Explanation

reverse() − Reverses the order of the elements of an array.

javascript_questions_answers.htm
Advertisements