3 ms·
Care to elaborate? Understanding prototypal inheritance seems essential to me, and Object.create() is the cleanest way to show it in action. The book also pre
by bpesquet 10y ago
Care to elaborate?
Understanding prototypal inheritance seems essential to me, and Object.create() is the cleanest way to show it in action.
The book also presents the alternative class syntax and numerous ES2015 additions like block-scoped variables and arrow functions, to name a few.
- rco8786 10y agoIt explicitly states it avoids the past and focuses on es2015, but then talks about old patterns.
- bpesquet 10y agoI don't consider Object.create() and factory functions to be "old patterns", but YMMV. How would you teach OOP basics to a JS newcomer then? Using only class without mentioning prototypes?