All arrays have built-in sort() and sorted() methods that can be used to sort the array, but they are subtly different.
For more answers and solutions to common Swift problems, see the Hacking with Swift knowledge base: https://www.hackingwithswift.com/exam...