Skip to content

Instantly share code, notes, and snippets.

@anthonygharvey
Last active March 6, 2019 01:22
Show Gist options
  • Save anthonygharvey/241c2abc569b283149f6895909af3c3a to your computer and use it in GitHub Desktop.
Save anthonygharvey/241c2abc569b283149f6895909af3c3a to your computer and use it in GitHub Desktop.
function reverse(string) {
let answer = string.split('') // step 1
answer.reverse() // step 2
answer = answer.join('') // step 3
return answer //step 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment