swap two numbers [ 823 views ]
Goal: to enjoy he beauty of out of box thinking
Everyday task to swap two numbers. Nothing easier like this, but do it in one line. The trickiest solution I have ever seen:
var a = 1, b = 23;
ok, swap them
b = [a, a = b][0];
this is it, simple beautiful