Last active
June 5, 2018 13:11
-
-
Save RoseCrime/22431cfdbcb7dd34174d379d0e65d9b0 to your computer and use it in GitHub Desktop.
StringReverser
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
const reverser = (text) =>{ | |
let string = text, | |
reverse = '' | |
for(i=string.length-1;i>=0;i--){ | |
reverse+= string[i] | |
} | |
return reverse | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment