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

Explanation

All of the above options are correct.

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 returns the length of the string?

A - length()

B - size()

C - index()

D - None of the above.

Answer : A

Explanation

length() method returns the length of the string.

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 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 splits a String object into an array of strings by separating the string into substrings?

A - slice()

B - split()

C - replace()

D - search()

Answer : B

Explanation

split() − Splits a String object into an array of strings by separating the string into substrings.

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

A - toLocaleUpperCase()

B - toUpperCase()

C - toString()

D - substring()

Answer : B

Explanation

toUpperCase() − Returns the calling string value converted to upper case.

Q 8 - Which of the following function of String object causes a string to be displayed in the specified color as if it were in a <font color='color'> tag?

A - fixed()

B - fontcolor()

C - blink()

D - bold()

Answer : B

Explanation

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

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 sorts the elements of an array?

A - toSource()

B - sort()

C - toString()

D - unshift()

Answer : B

Explanation

sort() − Sorts the elements of an array.

javascript_questions_answers.htm
Advertisements