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

Answer : C

Explanation

A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered.

Q 4 - Which built-in method returns the string representation of the number's value?

A - toValue()

B - toNumber()

C - toString()

D - None of the above.

Answer : C

Explanation

toString() method returns the string representation of the number's value.

Q 5 - Which of the following function of Number object defines how many total digits to display of a number?

A - toExponential()

B - toFixed()

C - toLocaleString()

D - toPrecision()

Answer : D

Explanation

toPrecision() − Defines how many total digits (including digits to the left and right of the decimal) to display of a number.

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 an HTML anchor that is used as a hypertext target?

A - anchor()

B - link()

C - blink()

D - big()

Answer : A

Explanation

anchor() − Creates an HTML anchor that is used as a hypertext target.

Q 8 - Which of the following function of String object creates an HTML hypertext link that requests another URL?

A - link()

B - sub()

C - sup()

D - small()

Answer : A

Explanation

link() − Creates an HTML hypertext link that requests another URL.

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 returns true if at least one element in this array satisfies the provided testing function?

A - reverse()

B - shift()

C - slice()

D - some()

Answer : D

Explanation

some() − Returns true if at least one element in this array satisfies the provided testing function.

javascript_questions_answers.htm
Advertisements