• 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 - Can you access Cookie using javascript?

A - true

B - false

Answer : A

Explanation

Yes! JavaScript can also manipulate cookies using the cookie property of the Document object.

Q 2 - How can you get the total number of arguments passed to a function?

A - Using args.length property

B - Using arguments.length property

C - Both of the above.

D - None of the above.

Answer : B

Explanation

Using arguments.length property, we can get the total number of arguments passed to a function.

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 returns the calling string value converted to upper case?

A - toUpperCase()

B - toUpper()

C - changeCase(case)

D - None of the above.

Answer : A

Explanation

toUpperCase() method returns the calling string value converted to upper case.

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 executes the search for a match between a regular expression and a specified string?

A - concat()

B - match()

C - replace()

D - search()

Answer : D

Explanation

search() − Executes the search for a match between a regular expression and a specified string.

Q 7 - Which of the following function of String object returns the calling string value converted to upper case while respecting the current locale?

A - toLocaleUpperCase()

B - toUpperCase()

C - toString()

D - substring()

Answer : A

Explanation

toLocaleUpperCase() − Returns the calling string value converted to upper case while respecting the current locale.

Q 8 - Which of the following function of String object causes a string to be displayed in fixed-pitch font as if it were in a <tt> tag?

A - fixed()

B - big()

C - blink()

D - bold()

Answer : A

Explanation

fixed() − Causes a string to be displayed in fixed-pitch font as if it were in a <tt> tag.

Q 9 - Which of the following function of Array object calls a function for each element in the array?

A - concat()

B - every()

C - filter()

D - forEach()

Answer : D

Explanation

forEach() − Calls a function for each element in the 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