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

As kabes pointed out above, there are more exceptions than the ones you mention. Don't forget bind, call/apply, strict mode, and arrow functions.

"this" is just a reference to the function context. Function context has a strong definition in programming languages. Saying that it's the stuff to the "left-of-dot" modulo a bunch of exceptions is sort of missing the forest for the trees, in my opinion.

Left-of-dot is a great way to introduce the concept but function context is so much more than just that.



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

Search: