Skip to content

Instantly share code, notes, and snippets.

@harsharora04
Created February 17, 2018 08:33
Show Gist options
  • Select an option

  • Save harsharora04/70aba6047e42f383c6a37061c387fe7a to your computer and use it in GitHub Desktop.

Select an option

Save harsharora04/70aba6047e42f383c6a37061c387fe7a to your computer and use it in GitHub Desktop.

Revisions

  1. harsharora04 revised this gist Feb 17, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reverse-modified.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    const reverse = (str) => {
    return [...str].reverse("").join("")
    return [...str].reverse().join("")
    }

    // a = "πŸ˜πŸ˜‚πŸ€£πŸ˜ƒ some random middle string πŸ˜…πŸ˜‰πŸ˜ŠπŸ˜‹πŸ˜ŽπŸ˜πŸ˜—"
  2. harsharora04 created this gist Feb 17, 2018.
    6 changes: 6 additions & 0 deletions reverse-modified.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    const reverse = (str) => {
    return [...str].reverse("").join("")
    }

    // a = "πŸ˜πŸ˜‚πŸ€£πŸ˜ƒ some random middle string πŸ˜…πŸ˜‰πŸ˜ŠπŸ˜‹πŸ˜ŽπŸ˜πŸ˜—"
    // reverse(a) = "πŸ˜—πŸ˜πŸ˜ŽπŸ˜‹πŸ˜ŠπŸ˜‰πŸ˜… gnirts elddim modnar emos πŸ˜ƒπŸ€£πŸ˜‚πŸ˜"