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 1 - Is JavaScript a case-sensitive language?

A - true

B - false

Answer : A

Explanation

Yes! JavaScript is a case-sensitive language. This means that language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.

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 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 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 Boolean object returns a string containing the source of the Boolean object?

A - toSource()

B - valueOf()

C - toString()

D - None of the above.

Answer : A

Explanation

toSource() − Returns a string containing the source of the Boolean object; you can use this string to create an equivalent object.

Q 6 - Which of the following function of String object is used to find a match between a regular expression and a string, and to replace the matched substring with a new substring?

A - concat()

B - match()

C - replace()

D - search()

Answer : C

Explanation

replace() − Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.

Q 7 - Which of the following function of String object creates a string to be displayed in a big font as if it were in a <big> tag?

A - anchor()

B - big()

C - blink()

D - italics()

Answer : B

Explanation

big() − Creates a string to be displayed in a big font as if it were in a <big> tag.

Q 8 - Which of the following function of String object creates an HTML hypertext link that requests another URL?

A - link()

B - sub()

C - sup()

D - small()

Answer : A

Explanation

link() − Creates an HTML hypertext link that requests another URL.

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

A - reverse()

B - push()

C - reduce()

D - reduceRight()

Answer : A

Explanation

reverse() − Reverses the order of the elements of an array.


javascript_questions_answers.htm

Advertisements