Created
December 22, 2017 02:21
-
-
Save Jae-kwang/dd4b1bffcad5f709d73c40f6ebe5ffb8 to your computer and use it in GitHub Desktop.
Swap two number without variable
This file contains hidden or 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
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