15. Getting Technical- What is wrong with my code?


Hello. I do not know what is wrong with my code. When I submit my code, it says that I am using sort when I am actually using sort!. Please help, thank you.


Error Message: It looks like you didn't sort the books array in descending order. Did you remember to use .sort! instead of .sort ?

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

books.sort! { |secondBook, firstBook| secondBook <=> firstBook}


Never mind, I figured out what I messed up.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.