Composition over Inheritance
Mattias Petter Johansson
21712
Thanks for this lesson Mattias! But if you have and object that has getters and setters, how to compose them since Object.assign is“unsuitable for merging new properties into a prototype if the merge sources contain getters”. Would you advise against getters and setters? Would apply a different logic using Object.getOwnPropertyDescriptor() and Object.defineProperty()?