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

Answer : D

Explanation

All of the above options are correct.

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

A - using typeof operator

B - using getType function

C - Both of the above.

D - None of the above.

Answer : A

Explanation

Using typeof operator, we can get the type of arguments passed to a function.

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 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 is used to match a regular expression against a string?

A - concat()

B - match()

C - search()

D - replace()

Answer : B

Explanation

match() − Used to match a regular expression against a string.

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 removes the last element from an array and returns that element?

A - pop()

B - push()

C - join()

D - map()

Answer : A

Explanation

pop() − Removes the last element from an array and returns that element.

Q 10 - Which of the following function of Array object represents the source code of an object?

A - toSource()

B - splice()

C - toString()

D - unshift()

Answer : A

Explanation

toSource() − Represents the source code of an object.


javascript_questions_answers.htm

Advertisements