Рет қаралды 11,701
This is more of an intermediate topic in JavaScript. Understanding the implications of how you architect your applications will help you down the road as your application becomes more mature and requires updates.
Inheritance and Composition are two approaches to designing your Objects to be maintainable.
This video focuses on the weakness of Inheritance when your objects start to morph in the future.
The examples in this video are built without Classes. They use Object.create and Object.assign to show the more standard JavaScript syntax.
Code GIST: gist.github.com/prof3ssorSt3v...
If you want more information about how to use Object.create( ) or Object.assign( ) watch these:
Object.assign: • Using Object assign( )...
Object.create: • JavaScript Object crea...