Created
July 20, 2017 01:50
-
-
Save chrisdemars/f7afd7ef1684de7e1cd1eca6bae0c1ad to your computer and use it in GitHub Desktop.
string-reverse created by chrisdemars - https://repl.it/J9rU/1
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
function reverseString(str) { | |
str = str.split(''); | |
str = str.reverse(); | |
str = str.join(''); | |
return str | |
} | |
reverseString("hello"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment