• 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 returns the length of the string?

A - length()

B - size()

C - index()

D - None of the above.

Answer : A

Explanation

length() method returns the length of the string.

Q 4 - All user-defined objects and built-in objects are descendants of an object called Object?

A - true

B - false

Answer : A

Explanation

All user-defined objects and built-in objects are descendants of an object called Object.

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 returns the index within the calling String object of the last occurrence of the specified value?

A - lastIndexOf()

B - search()

C - substr()

D - indexOf()

Answer : A

Explanation

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

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 in the specified color as if it were in a <font color='color'> tag?

A - fixed()

B - fontcolor()

C - blink()

D - bold()

Answer : B

Explanation

fontcolor() − Causes a string to be displayed in the specified color as if it were in a <font color = 'color'> tag.

Q 9 - Which of the following function of Array object creates a new array with all of the elements of this array for which the provided filtering function returns true?

A - concat()

B - every()

C - filter()

D - some()

Answer : C

Explanation

filter() − Creates a new array with all of the elements of this array for which the provided filtering function returns true.

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