Javascript Online Quiz


Advertisements


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 : D

Explanation

All of the above options are correct.

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 returns the characters in a string beginning at the specified location?

A - substr()

B - getSubstring()

C - slice()

D - None of the above.

Answer : A

Explanation

substr() method returns the characters in a string beginning at the specified location through the specified number of characters.

Q 5 - Which of the following function of String object returns the character at the specified index?

A - charAt()

B - charCodeAt()

C - concat()

D - indexOf()

Answer : A

Explanation

charAt() − Returns the character at the specified index.

Q 6 - Which of the following function of String object returns the characters in a string beginning at the specified location through the specified number of characters?

A - slice()

B - split()

C - substr()

D - search()

Answer : C

Explanation

substr() − Returns the characters in a string beginning at the specified location through the specified number of characters.

Q 7 - Which of the following function of String object creates a string to be displayed as bold as if it were in a <b> tag?

A - anchor()

B - big()

C - blink()

D - bold()

Answer : D

Explanation

bold() − Creates a string to be displayed as bold as if it were in a <b> tag.

Q 8 - Which of the following function of String object causes a string to be displayed as struck-out text, as if it were in a <strike> tag?

A - sup()

B - small()

C - strike()

D - sub()

Answer : C

Explanation

strike() − Causes a string to be displayed as struck-out text, as if it were in a <strike> 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 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