Hoy te ofreciste como voluntario para trabajar como bibliotecario. Te dieron un array de objetos, cada uno con información diferente sobre un libro. Debes ordenar los objetos alfabéticamente por el apellido del autor.
sortByLastName([
{ name: "Harry Potter", rating: "8+", author: "Joanne Rowling" },
{ name: "Warcross", rating: "13+", author: "Marie Lu" },
{ name: "The Hunger Games", rating: "12+", author: "Suzanne Collins" },
]) ➞ [
{ name: "The Hunger Games", rating: "12+", author: "Suzanne Collins" },
{ name: "Warcross", rating: "13+", author: "Marie Lu" },
{ name: "Harry Potter", rating: "8+", author: "Joanne Rowling" },
]name, rating y author.author siempre incluirá únicamente un nombre y un apellido.