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

Explanation

Both of the above options are correct.

Q 3 - Which built-in method returns the character at the specified index?

A - characterAt()

B - getCharAt()

C - charAt()

D - None of the above.

Answer : C

Explanation

charAt() method returns the character at the specified index.

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 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 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 be displayed in a big font as if it were in a <big> tag?

A - anchor()

B - big()

C - blink()

D - italics()

Answer : B

Explanation

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

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