March 2021
Intermediate to advanced
360 pages
9h 56m
English
This chapter covers
Object.assign and the spread operator to build new objectsClass inheritance is very rarely (perhaps never) the best approach in JavaScript.
—Eric Elliot
In chapter 2, we looked at some of the scaffolding needed to create prototype chains to model inheritance and how classes streamline this process. Remember that the goal of using inheritance is to improve reusability. Now we’ll continue the topic of assembling your objects to achieve the same level of code reuse, but in a way that doesn’t require you to ...
Read now
Unlock full access