Understanding the ‘this’ keyword in the JavaScript language is arguably one of the hardest things to grasp especially for beginning developers.
The guys over at SitePoint have published an article that covers four points worth noting with respect to ‘this.’
In JavaScript ‘this’ Gotchas, the authors cover:
- Forgetting ‘new’
- Module madness
- Method misconceptions
- Referencing methods
The article is concise and complete with code examples.
Recommended, for sure.
Speak your mind...