Created
April 3, 2016 22:19
-
-
Save jamc92/3fedb093ced36bcf4f86776abc32be9a 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
function reverseString(str) { | |
return str.split('').reverse().join(''); | |
} | |
reverseString("hello", ""); |
Author
jamc92
commented
Apr 3, 2016
- reverseString("hello") should return a string.
- reverseString("hello") should become "olleh".
- reverseString("Howdy") should become "ydwoH".
- reverseString("Greetings from Earth") should return "htraE morf sgniteerG".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment