As gdoron pointed out,
var a = "a";
var b = "b";
a = [b][b = a,0];
Will swap a
and b
, and although it looks a bit of hacky, it has triggered my curiosity and I am very curious at how it works. It doesn't make any sense to me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…