Today you volunteered as a librarian. You were given an array of objects, each one containing different book information. You need to sort the objects in alphabetical order of the author's last name.
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, and author property on each object.author property will always feature only a first and last name.