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
\times consumption\]

Q 1 - Calculate the emissions of a car consuming tl/10km Porsche model \[emissions(gCO_2/100km) = 19.427 + 27.965\times consumption\]

A - JavaScript is a lightweight, interpreted programming language.

B - JavaScript is designed for creating network-centric applications.

C - JavaScript is complementary to and integrated with Java.

D - All of the above.

Answer : D

Explanation

All of the above options are correct.

Q 2 - Can you assign a anonymous function to a variable?

A - true

B - false

Answer : A

Explanation

Yes! An anonymous function can be assigned to a variable.

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 built-in method returns the string representation of the number's value?

A - toValue()

B - toNumber()

C - toString()

D - None of the above.

Answer : C

Explanation

toString() method returns the string representation of the number's value.

Q 5 - Which of the following function of Boolean object returns the primitive value of the Boolean object?

A - toSource()

B - valueOf()

C - toString()

D - None of the above.

Answer : B

Explanation

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

Q 6 - Which of the following function of String object extracts a section of a string and returns a new string?

A - slice()

B - split()

C - replace()

D - search()

Answer : A

Explanation

slice() − Extracts a section of a string and returns a new string.

Q 7 - Which of the following function of String object returns the calling string value converted to lower case while respecting the current locale?

A - toLocaleLowerCase()

B - toLowerCase()

C - toString()

D - substring()

Answer : A

Explanation

toLocaleLowerCase() − Returns the calling string value converted to lower case while respecting the current locale.

Q 8 - Which of the following function of String object causes a string to be italic, as if it were in an <i> tag?

A - fixed()

B - fontcolor()

C - fontsize()

D - italics()

Answer : D

Explanation

italics() − Causes a string to be italic, as if it were in an <i> tag.

Q 9 - Which of the following function of Array object creates a new array with the results of calling a provided function on every element in this array?

A - push()

B - join()

C - pop()

D - map()

Answer : D

Explanation

map() − Creates a new array with the results of calling a provided function on every element in this array.

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