Created
November 18, 2015 00:26
-
-
Save kkchu791/a94fbb4b4989793129a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reverse_word_order(string) | |
string.split(" ").reverse | |
end | |
p reverse_word_order("I want to eat pizza.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment