• 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

Q 1 - Is JavaScript a case-sensitive language?

A - true

B - false

Answer : A

Explanation

Yes! JavaScript is a case-sensitive language. This means that language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.

Answer : D

Explanation

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

Q 3 - Which of the following type of variable takes precedence over other if names are same?

A - global variable

B - local variable

C - Both of the above.

D - None of the above.

Answer : B

Explanation

A local variable takes precedence over a global variable with the same name.

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 String object combines the text of two strings and returns a new string?

A - add()

B - merge()

C - concat()

D - append()

Answer : C

Explanation

concat() − Combines the text of two strings and returns a new string.

Q 6 - Which of the following function of String object is used to find a match between a regular expression and a string, and to replace the matched substring with a new substring?

A - concat()

B - match()

C - replace()

D - search()

Answer : C

Explanation

replace() − Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.

Q 7 - Which of the following function of String object returns the calling string value converted to lower case?

A - toLocaleLowerCase()

B - toLowerCase()

C - toString()

D - substring()

Answer : B

Explanation

toLowerCase() − Returns the calling string value converted to lower case.

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

A - sup()

B - small()

C - strike()

D - sub()

Answer : C

Explanation

strike() − Causes a string to be displayed as struck-out text, as if it were in a <strike> tag.

Q 9 - Which of the following function of Array object creates a new array with the results of calling a provided function on every element in this array?

A - push()

B - join()

C - pop()

D - map()

Answer : D

Explanation

map() − Creates a new array with the results of calling a provided function on every element in this array.

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