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

Explanation

Both of the above options are correct.

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 calls a function for each element in the array?

A - while()

B - loop()

C - forEach()

D - None of the above.

Answer : C

Explanation

forEach() method calls a function for each element in the array.

Q 4 - Which of the following function of Number object forces a number to display in exponential notation?

A - toExponential()

B - toFixed()

C - toPrecision()

D - toLocaleString()

Answer : A

Explanation

toExponential(): Forces a number to display in exponential notation, even if the number is in the range in which JavaScript normally uses standard notation.

Q 5 - Which of the following function of Number object returns the number's value?

A - toString()

B - valueOf()

C - toLocaleString()

D - toPrecision()

Answer : B

Explanation

valueOf() − Returns the number's value.

Q 6 - Which of the following function of String object returns the characters in a string between two indexes into the string?

A - slice()

B - split()

C - substr()

D - substring()

Answer : D

Explanation

substring() − Returns the characters in a string between two indexes into the string.

Q 7 - Which of the following function of String object returns the primitive value of the specified object.

A - toLocaleUpperCase()

B - toUpperCase()

C - toString()

D - valueOf()

Answer : D

Explanation

valueOf() − Returns the primitive value of the specified object.

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 creates a new array with all of the elements of this array for which the provided filtering function returns true?

A - concat()

B - every()

C - filter()

D - some()

Answer : C

Explanation

filter() − Creates a new array with all of the elements of this array for which the provided filtering function returns true.

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