Inheritance in Javascript Using Extend Function

You can create function called extend to make subclassing process

This function will do what other languages do using extend keyword

Now you can create the parent class Vehicle and create the subclass Car from it

In line 16, I am using extend() method for subclassing process