- Write a function called
sortNames. Given an array of names, returns them in alphabetical order.
-
Every array comes with default functions or methods that allows sorting, use them inside your function!
-
Stuck on sorting? Read Mozilla's page on sorting arrays: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort