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 - Can you assign a anonymous function to a variable?

A - true

B - false

Answer : A

Explanation

Yes! An anonymous function can be assigned to a variable.

Q 3 - Which of the following type of variable takes precedence over other if names are same?

A - global variable

B - local variable

C - Both of the above.

D - None of the above.

Answer : B

Explanation

A local variable takes precedence over a global variable with the same name.

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 the primitive value of the Boolean object?

A - toSource()

B - valueOf()

C - toString()

D - None of the above.

Answer : B

Explanation

valueOf() − Returns the primitive value of the Boolean 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 creates a string to blink as if it were in a tag?

A - anchor()

B - big()

C - blink()

D - italics()

Answer : C

Explanation

blink() − Creates a string to blink as if it were in a tag.

Q 8 - Which of the following function of String object causes a string to be displayed in a small font, as if it were in a tag?

A - link()

B - small()

C - sup()

D - sub()

Answer : B

Explanation

small() − Causes a string to be displayed in a small font, as if it were in a 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 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