Last active
March 3, 2018 16:05
YaadCode: FreeCodeCamp Live Coding Sessions Challenges
This file contains 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
/* | |
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