Skip to content

Instantly share code, notes, and snippets.

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