Hacker News new | ask | show | jobs
by badman_ting 4562 days ago
That's cool. But don't write JS if you don't know what this does, because it will bite you.
1 comments

Or just avoid using `this` unless you're sure about what it does in a particular context.
Or just learn what 'this' means because, seriously, you're a programmer and it's not that hard to figure out.
That means that every person who reads your code also must understand "this" correctly in order to interpret your code correctly.

In certain team environments, I avoid 'this' because the programmer who is looking at this file next may not understand it's proper usage.

Come on, there are what, half a dozen keywords in JavaScript? It's not that complicated.