Skip to content

Instantly share code, notes, and snippets.

@cbscribe
Created March 11, 2013 07:24
Show Gist options
  • Save cbscribe/5132514 to your computer and use it in GitHub Desktop.
Save cbscribe/5132514 to your computer and use it in GitHub Desktop.
trick - swap two variables without a tempvar
a = 10
b = 20
a = a + b
b = a - b
a = a - b
# a = 20
# b = 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment