3 ms·
Does anyone know of a tutorial that breaks down (with code examples) all the different methods of JS inheritance and their disadvantages/advantages? I understan
by argonaut 14y ago
Does anyone know of a tutorial that breaks down (with code examples) all the different methods of JS inheritance and their disadvantages/advantages? I understand that Object.create is the now-recommended way to do things, but I still get confused because there are a bajillion ways of modeling inheritance in JS.
- tantalor 14y agoSome patterns off the top of my head, 1. Prototype 2. Delegate 3. Mixin 4. Module Understand how those patterns work and you should be able to understand how the libraries vary. Might also help: http://stackoverflow.com/questions/1645027/popular-javascript-inheritance-patterns http://stackoverflow.com/questions/1645027/popular-javascrip...