Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It clicked for me when I decided that there were no methods and considered all function invocations to be special cases of `apply`. Then the case you mentioned becomes a bog standard case of a property lookup, and the callback becomes a case of `apply(window, [args])`.

tldr: JavaScript has functions, not methods :)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: