A

Admin • 832.27K Points
Coach

Q. What is the purpose of `map` in Swift?

  • (A) To filter values in a list
  • (B) To transform values in a list
  • (C) To reduce a list to one value
  • (D) To sort the list
  • Correct Answer - Option(B)
  • Views: 26
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin

`map` is used to apply a transformation to each element in a collection.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.