LearnFrenzy
Sign in Take a free test

Array Methods · Array Methods MCQ · Question 1

What does map return? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links