• 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 - Can you pass a anonymous function as an argument to another function?

A - true

B - false

Answer : A

Explanation

Yes! An anonymous function can be passed as an argument to another function.

Answer : C

Explanation

A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered.

Q 4 - Which built-in method reverses the order of the elements of an array?

A - changeOrder(order)

B - reverse()

C - sort(order)

D - None of the above.

Answer : B

Explanation

reverse() method reverses the order of the elements of an array -- the first becomes the last, and the last becomes the first.

Q 5 - Which of the following function of Number object returns a string value version of the current number?

A - toString()

B - toFixed()

C - toLocaleString()

D - toPrecision()

Answer : A

Explanation

toString() − Returns a string value version of the current number.

Q 6 - Which of the following function of String object extracts a section of a string and returns a new string?

A - slice()

B - split()

C - replace()

D - search()

Answer : A

Explanation

slice() − Extracts a section of a string and returns a new string.

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

A - toLocaleLowerCase()

B - toLowerCase()

C - toString()

D - substring()

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 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 adds one or more elements to the end of an array and returns the new length of the array?

A - pop()

B - push()

C - join()

D - map()

Answer : B

Explanation

push() − Adds one or more elements to the end of an array and returns the new length of the array.

Q 10 - Which of the following function of Array object returns true if at least one element in this array satisfies the provided testing function?

A - reverse()

B - shift()

C - slice()

D - some()

Answer : D

Explanation

some() − Returns true if at least one element in this array satisfies the provided testing function.

javascript_questions_answers.htm
Advertisements