Skip to content

Instantly share code, notes, and snippets.

@brainyfarm
Last active June 21, 2016 13:54
Show Gist options
  • Save brainyfarm/bedf69e67f6008cab4a198cd29c0d6ed to your computer and use it in GitHub Desktop.
Save brainyfarm/bedf69e67f6008cab4a198cd29c0d6ed to your computer and use it in GitHub Desktop.
Olawale/FreeCodeCamp Algorithm: Reverse a String
function reverseString(str) {
// Split into an array, reverse, join and return the reversed string
return str.split('').reverse().join('');
}
reverseString("hello");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment