Course · Section 11: Working With Arrays · Lecture 157: The map Method
Implement `sortByName(items)` returning a new array sorted ascending by `name`, without mutating the input.
+ 1 hidden test run on Submit.
Spread into a new array first because sort mutates. localeCompare gives correct alphabetical order, and the original list is preserved.
Run your code to see results.