In Javascript we don’t have classes, rather we only have objects. So if we want to implement inheritance with objects we can get the help of prototypical inheritance. Before talking about prototypical inheritance, we all should stay on the same pitch in terms of javascript prototype. So, Prototype in Javascript Suppose we have…