3 ms·
Is there a good book or website to learn about prototypical inheritance? I've read a lot of Crockford's book and some stuff online about it, but I've never run
by backslash_16 12y ago
Is there a good book or website to learn about prototypical inheritance? I've read a lot of Crockford's book and some stuff online about it, but I've never run across the pattern you use above.
It would be great to know what the benefits are vs declaring function literals on an object, or declaring a function directly on Bar's prototype.
- cstrahan 12y agoMozilla's documentation does a good job explaining prototypal inheritance: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inhe...
- jurassic 12y agoMy "Aha!" moment came while reading this Kyle Simpson blog series http://davidwalsh.name/javascript-objects http://davidwalsh.name/javascript-objects