Created
May 6, 2013 21:23
-
-
Save mehagel/5528313 to your computer and use it in GitHub Desktop.
This file contains 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_words(str) | |
new_str= str.split.reverse.join(' ') | |
return new_str.reverse | |
end | |
reverse_words("I cant wait to get home") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment