Created
November 30, 2018 17:42
-
-
Save stephencweiss/fd75f78fd1c21d935a043d0f4e38e0f3 to your computer and use it in GitHub Desktop.
A standard swap function in Javascript
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
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