Skip to content

Instantly share code, notes, and snippets.

@stephencweiss
Created November 30, 2018 17:42
Show Gist options
  • Save stephencweiss/fd75f78fd1c21d935a043d0f4e38e0f3 to your computer and use it in GitHub Desktop.
Save stephencweiss/fd75f78fd1c21d935a043d0f4e38e0f3 to your computer and use it in GitHub Desktop.
A standard swap function in Javascript
let swap = (i, j) => {
let temp = i;
i = j;
j = temp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment