Beginner
Ruby
Q29 / 100
What does the "map" method do when called on an array?
Correct! Well done.
Incorrect.
The correct answer is B) Returns a new array with the results of applying a block to each element
B
Correct Answer
Returns a new array with the results of applying a block to each element
Explanation
map (alias collect) transforms each element via the given block and returns a new array of the results, leaving the original unchanged.
Progress
29/100