This one-liner works for x==y: x ^= y ^ (y = x); Is this really code, or some kind of new text emojis? :)