Inheritance in JavaScript
If you have read first part of the series, Defining Classes in JavaScript, you are probably comfortable with the basic constructs of object orientation in JavaScript. The next important feature of object-oriented programming is the inheritance. Inheritance allows to create new classes which reuse, extend and modify the logic defined in other classes. It could give you lots of control and flexibility over your code.
As discussed in the previous post, function has prototype property and when this function is invoked using new keyword, it creates an object which contains all methods of the prototype.