Question 1
Back to Exercise
What does arr.map(fn) return?
- A A new array of the same length containing fn's return value for each element Correct
- B The original array, modified
- C Only the elements for which fn returns true
- D undefined
Correct Answer: Option A
map always produces one output element per input element and leaves the original array unchanged.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!