Hacker News new | ask | show | jobs
by Xichom2k 2836 days ago
Due to javascript's funky notion of object methods. If you just pass the function reference itself invoking it will execute it with a |this| set to undefined.

Put differently, a property access x = foo.bar followed by x() is not the same as foo.bar()

1 comments

The default this context would be the global window object (in the browser).
Not in strict mode