Skip to content

Instantly share code, notes, and snippets.

@Jae-kwang
Created December 22, 2017 02:21
Show Gist options
  • Save Jae-kwang/dd4b1bffcad5f709d73c40f6ebe5ffb8 to your computer and use it in GitHub Desktop.
Save Jae-kwang/dd4b1bffcad5f709d73c40f6ebe5ffb8 to your computer and use it in GitHub Desktop.
Swap two number without variable
var x = 10;
var y = 5;
x = x + y // x = 15
y = x - y // y = 10
x = x - y // x = 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment