Question 11
Back to Exercise
Which method changes the array it is called on?
- A sort Correct
- B map
- C filter
- D flatMap
Correct Answer: Option A
sort works in place and returns the same array. map, filter and flatMap return new arrays. Use toSorted for a sorted copy.
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!