Javascript Online Quiz


Advertisements


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 2 - Which of the following is a valid type of function javascript supports?

A - named function

B - anonymous function

C - Both of the above.

D - None of the above.

Answer : C

Explanation

A function in JavaScript can be either named or anonymous.

Q 3 - Which built-in method removes the last element from an array and returns that element?

A - last()

B - get()

C - pop()

D - None of the above.

Answer : C

Explanation

pop() method removes the last element from an array and returns that element.

Q 4 - Which built-in method returns the calling string value converted to lower case?

A - toLowerCase()

B - toLower()

C - changeCase(case)

D - None of the above.

Answer : A

Explanation

toLowerCase() method returns the calling string value converted to lower case.

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

A - substr()

B - search()

C - lastIndexOf()

D - indexOf()

Answer : D

Explanation

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

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

A - fixed()

B - fontcolor()

C - fontsize()

D - bold()

Answer : C

Explanation

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

Q 9 - Which of the following function of Array object adds one or more elements to the end of an array and returns the new length of the array?

A - pop()

B - push()

C - join()

D - map()

Answer : B

Explanation

push() − Adds one or more elements to the end of an array and returns the new length of the array.

Q 10 - Which of the following function of Array object removes the first element from an array and returns that element?

A - reverse()

B - shift()

C - slice()

D - some()

Answer : B

Explanation

shift() − Removes the first element from an array and returns that element.


javascript_questions_answers.htm

Advertisements