Last active
January 25, 2018 06:31
-
-
Save dragonza/a6261fe042f620495cfdc0c5a90842e2 to your computer and use it in GitHub Desktop.
String reversal
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 reverse(str) { | |
return str.split('').reduce((rev, char) => char + rev, '') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment