A

Admin • 833.24K Points
Coach

Q. Which function is used to sort an array in Swift?

  • (A) sortArray()
  • (B) sorted()
  • (C) arrange()
  • (D) filter()
  • Correct Answer - Option(B)
  • Views: 39
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin

`sorted()` returns a sorted version of the array without changing the original.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.