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

Answer : D

Explanation

window.location='http://www.newlocation.com'; is the correct option.

Q 3 - Which built-in method combines the text of two strings and returns a new string?

A - append()

B - concat()

C - attach()

D - None of the above.

Answer : B

Explanation

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

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 String object returns a number indicating the Unicode value of the character at the given index?

A - charAt()

B - charCodeAt()

C - concat()

D - indexOf()

Answer : B

Explanation

charCodeAt() − Returns a number indicating the Unicode value of the character at the given index.

Q 6 - Which of the following function of String object returns the index within the calling String object of the first occurrence of the specified value?

A - substr()

B - search()

C - lastIndexOf()

D - indexOf()

Answer : D

Explanation

indexOf() − Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.

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

A - anchor()

B - big()

C - blink()

D - italics()

Answer : C

Explanation

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

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

A - sup()

B - small()

C - strike()

D - sub()

Answer : A

Explanation

sup() − Causes a string to be displayed as a superscript, as if it were in a <sup> tag.

Q 9 - Which of the following function of Array object applies a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value?

A - pop()

B - push()

C - reduce()

D - reduceRight()

Answer : C

Explanation

reduce() − Applies a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value.

Q 10 - Which of the following function of Array object represents the source code of an object?

A - toSource()

B - splice()

C - toString()

D - unshift()

Answer : A

Explanation

toSource() − Represents the source code of an object.

javascript_questions_answers.htm
Advertisements