• 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

Q 2 - Which of the following is the correct syntax to print a page using JavaScript?

A - window.print();

B - browser.print();

C - navigator.print();

D - document.print();

Answer : A

Explanation

window.print(); is the correct option.

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 sorts the elements of an array?

A - changeOrder(order)

B - order()

C - sort()

D - None of the above.

Answer : C

Explanation

sort() method sorts the elements of an array.

Q 5 - Which of the following function of Boolean object returns a string of either 'true' or 'false' depending upon the value of the object?

A - toSource()

B - valueOf()

C - toString()

D - None of the above.

Answer : C

Explanation

toString() − Returns a string of either 'true' or 'false' depending upon the value of the object.

Q 6 - Which of the following function of String object is used to find a match between a regular expression and a string, and to replace the matched substring with a new substring?

A - concat()

B - match()

C - replace()

D - search()

Answer : C

Explanation

replace() − Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.

Q 7 - Which of the following function of String object returns the calling string value converted to upper case?

A - toLocaleUpperCase()

B - toUpperCase()

C - toString()

D - substring()

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 in fixed-pitch font as if it were in a <tt> tag?

A - fixed()

B - big()

C - blink()

D - bold()

Answer : A

Explanation

fixed() − Causes a string to be displayed in fixed-pitch font as if it were in a <tt> tag.

Q 9 - Which of the following function of Array object returns true if every element in this array satisfies the provided testing function?

A - concat()

B - every()

C - push()

D - some()

Answer : B

Explanation

every() − Returns true if every element in this array satisfies the provided testing function.

Q 10 - Which of the following function of Array object returns a string representing the array and its elements?

A - toSource()

B - sort()

C - splice()

D - toString()

Answer : D

Explanation

toString() − Returns a string representing the array and its elements.

javascript_questions_answers.htm
Advertisements