I am new to JavaScript and trying to get my head around inheritance when I have a constructor that takes parameters.
Suppose I have a base object called Base:
function Base(param1, param2) {
// Constructor for Base that does something with params
}
I want another object, for example called BaseChild which inherits from Base and then another object called Child which inherits from BaseChild.
How would I go about creating the constructors for BaseChild and Child using basic JavaScript (i.e. no special plug-ins)?.
Note:
I thought you might be able create BaseChild as follows:
var BaseChild = new Base(param1, param2);
But I don't have the values for param1 or param2 in BaseChild, only in Child. I hope this makes sense!.