Getting tech


books = ["Charlie and the Chocolate Factory", "War and Peace", "Utopia", "A Brief History of Time", "A Wrinkle in Time"]

# To sort our books in ascending order, in-place
books.sort! { |firstBook, secondBook| firstBook <=> secondBook }

# Sort your books in descending order, in-place below

books.sort! { |fifthBook, forthBook| fifthBook <=> forthBook } 

ERROR: Oops, try again. It looks like you didn't sort the books array in descending order.
 Did you remember to use .sort! instead of .sort ?


Hi @james423

Looking more attentively to this code:

We need to switch fifthBook and forthBook in the bold part so that we can sort our book in descending order.