Beginner JavaScript
Q8 / 100

What does Array.prototype.map() return?

Correct! Well done.

Incorrect.

The correct answer is B) A new array with each element transformed by the callback

B

Correct Answer

A new array with each element transformed by the callback

Explanation

map() creates a new array. [1,2,3].map(x => x*2) returns [2,4,6]. The original array is not modified.

Progress
8/100