News for hackers. Stuff that matters.
Re:WTFJS? by andreyf on Friday February 12, 2010 @09:07PM (#1122382)
No, it amonts to Array.prototype.reverse.call(window) - window doesn't have a reverse method AFAIK, so window.reverse() will raise a TypeError (since you can't call something "undefined").
Re:WTFJS? by Tichy on Saturday February 13, 2010 @11:09AM (#1123126)
are you sure? i thought in js functions are not really tied to "their" object, instead they receive an implicit this argument. wouldn't x belong to window here? that is, window doesn't have reverse, but now it has x