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 - 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.

Answer : B

Explanation

var book = new Object(); creates an object.

Q 5 - Which of the following function of String object returns a number indicating the Unicode value of the character at the given index?

A - charAt()

B - charCodeAt()

C - concat()

D - indexOf()

Answer : B

Explanation

charCodeAt() − Returns a number indicating the Unicode value of the character at the given index.

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 lower case?

A - toLocaleLowerCase()

B - toLowerCase()

C - toString()

D - substring()

Answer : B

Explanation

toLowerCase() − Returns the calling string value converted to lower case.

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

A - fixed()

B - fontcolor()

C - fontsize()

D - bold()

Answer : C

Explanation

fontsize() − Causes a string to be displayed in the specified size as if it were in a <font size = 'size'> 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 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