DEV Community

Discussion on: How can you swap two variables without using a third?

Collapse
 
leneko profile image
leNEKO • Edited

oh shorter,

b ^= a
a ^= b
b ^= a