Skip to content

Instantly share code, notes, and snippets.

@mtroiani
Created December 11, 2015 18:50
Show Gist options
  • Save mtroiani/1a8e9b9254c82ee56e2b to your computer and use it in GitHub Desktop.
Save mtroiani/1a8e9b9254c82ee56e2b to your computer and use it in GitHub Desktop.
http://www.freecodecamp.com/mtroiani 's solution for Bonfire: Reverse a String
// Bonfire: Reverse a String
// Author: @mtroiani
// Challenge: http://www.freecodecamp.com/challenges/bonfire-reverse-a-string
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function reverseString(str) {
str = str.split('').reverse().join('');
return str;
}
reverseString("hello");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment