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

A - getIndex()

B - location()

C - indexOf()

D - None of the above.

Answer : C

Explanation

indexOf() method returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.

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 String object combines the text of two strings and returns a new string?

A - add()

B - merge()

C - concat()

D - append()

Answer : C

Explanation

concat() − Combines the text of two strings and returns a new string.

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 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 Array object returns a new array comprised of this array joined with other array(s) and/or value(s)?

A - concat()

B - pop()

C - push()

D - some()

Answer : A

Explanation

concat() − Returns a new array comprised of this array joined with other array(s) and/or value(s).

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 applies a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value?

A - pop()

B - push()

C - reduce()

D - reduceRight()

Answer : D

Explanation

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

javascript_questions_answers.htm
Advertisements