2 ms·
I did a write up on my blog [1] that attempts to explain how prototypal inheritance works. That said, whenever I teach OOP in JS I have found that a lot of dev
by raju 9y ago
I did a write up on my blog [1] that attempts to explain how prototypal inheritance works.
That said, whenever I teach OOP in JS I have found that a lot of developers do not understand the prototypal nature of JS.
Another source of confusion is the `this` keyword, how it works, and consequently how apply/call (which this article uses) affect `this' inside the function (or method).
[1] - http://looselytyped.com/blog/2012/08/22/on-prototypal-inheritance-part-ii/ http://looselytyped.com/blog/2012/08/22/on-prototypal-inheri...