• 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 : A

Explanation

document.cookie = 'key1 = value1; key2 = value2; expires = date'; 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 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 Number object returns a string value version of the current number in a format that may vary according to a browser's locale settings.?

A - toExponential()

B - toFixed()

C - toLocaleString()

D - toString()

Answer : C

Explanation

toLocaleString() − Returns a string value version of the current number in a format that may vary according to a browser's locale settings.

Q 6 - Which of the following function of String object returns the characters in a string between two indexes into the string?

A - slice()

B - split()

C - substr()

D - substring()

Answer : D

Explanation

substring() − Returns the characters in a string between two indexes into the string.

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 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 extracts a section of an array and returns a new array?

A - reverse()

B - shift()

C - slice()

D - some()

Answer : C

Explanation

slice() − Extracts a section of an array and returns a new array.

javascript_questions_answers.htm
Advertisements