Hard
our application needs to sort user names that include international characters (é, ñ, ü, etc.). The current implementation isn't handling these correctly. Which sorting implementation will properly handle international character sets?
1const users = [2 "José Rodriguez",3 "Andre Smith",4 "Björn Österberg",5 "Zoë Williams",6 "Núria Garcia",7 "Adam Jones"8];910function sortUserNames(names, locale = 'en') {11 return names.sort(/* Missing comparator function */);12}1314console.log(sortUserNames(users, 'es'));