DEV Community

Discussion on: Terrible interview question: Swap variables without a temporary

Collapse
 
moopet profile image
Ben Sinclair

If someone asked me to swap "two variables" and suggested that as an answer, I'd say my first variable contained the string "hello world" and the second one an array of types of cat.

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Xor'ing those two might result in a cute internet meme. :)