rat*_*tty 3

(x=[].reverse)() === window // true

一开始不明白这个,但我想这很简单:首先 x 成为数组的逆函数,然后用this === window。所以相当于window.reverse(). 刚刚查了一下,reverse() 可以正常工作,所以window.reverse() === window- 尽管它可能与以前有所不同。

我从这个链接得到了这个答案

http://news.ycombinator.com/item?id=1122004

  • 至少链接到您从 http://news.ycombinator.com/item?id=1122004 获取它的位置 (6认同)