Skip to content

Instantly share code, notes, and snippets.

@harsharora04
Created February 17, 2018 08:33
Show Gist options
  • Save harsharora04/70aba6047e42f383c6a37061c387fe7a to your computer and use it in GitHub Desktop.
Save harsharora04/70aba6047e42f383c6a37061c387fe7a to your computer and use it in GitHub Desktop.
const reverse = (str) => {
return [...str].reverse().join("")
}
// a = "πŸ˜πŸ˜‚πŸ€£πŸ˜ƒ some random middle string πŸ˜…πŸ˜‰πŸ˜ŠπŸ˜‹πŸ˜ŽπŸ˜πŸ˜—"
// reverse(a) = "πŸ˜—πŸ˜πŸ˜ŽπŸ˜‹πŸ˜ŠπŸ˜‰πŸ˜… gnirts elddim modnar emos πŸ˜ƒπŸ€£πŸ˜‚πŸ˜"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment