Skip to content

Instantly share code, notes, and snippets.

@realgio95
Last active March 3, 2018 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realgio95/db411c6148cb15d969e87b928de5af1f to your computer and use it in GitHub Desktop.
Save realgio95/db411c6148cb15d969e87b928de5af1f to your computer and use it in GitHub Desktop.
YaadCode: FreeCodeCamp Live Coding Sessions Challenges
/*
Sign up for YaadCode - Live FreeCode Camp Coding Sessions Twice Weekly on Skype
You may join the FreeCodeCamp, Kingston Group here: https://www.facebook.com/groups/free.code.camp.kingston.jamaica/
https://www.freecodecamp.org/challenges/reverse-a-string
*/
function reverseString(str) {
var chars = str.split("");
chars.reverse();
newStr = chars.join("");
return newStr;
}
reverseString("hello"); //Expected Output: "olleh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment