In this section, we will talk about another way, via which we can inherit prototypes. Here, I’ll be using Object.Create to use the same. In the last section, we have seen function constructor pattern to create objects from the blueprint. With that object.create() method, things work bit differently. In this case, we first define an object which will act as a prototype and then create a new object based on that very prototype.
841 total views, no views today