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 - Can you pass a anonymous function as an argument to another function?

A - true

B - false

Answer : A

Explanation

Yes! An anonymous function can be passed as an argument to another function.

Q 3 - Which built-in method adds one or more elements to the end of an array and returns the new length of the array?

A - last()

B - put()

C - push()

D - None of the above.

Answer : C

Explanation

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

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

A - lastIndexOf()

B - search()

C - substr()

D - indexOf()

Answer : A

Explanation

lastIndexOf() − Returns the index within the calling String object of the last 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 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 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 applies a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value?

A - pop()

B - push()

C - reduce()

D - reduceRight()

Answer : C

Explanation

reduce() − Applies a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value.

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

A - unshift()

B - sort()

C - splice()

D - toString()

Answer : A

Explanation

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


javascript_questions_answers.htm

Advertisements