.reverse method is called the same way
.length is, but instead of asking Ruby to tell you how long a string is, it spits out a backwards version of the string you gave it. For instance,
will result in
Reversing input can be useful if you want to sort a list of values from highest to lowest instead of lowest to highest. (We’ll get to sorting in later lessons.)
.reverse method on your name. Don’t forget those quotation marks around your name to make it a string!
puts the answer to the console if you want to see the value.