Lets assume i have a baseclass and i want to inherit the properties from the constructor.
Note: This is an example code. It is not intended to work or anything, just to demonstrate my problem
Base Class
class BaseClass {
constructor(a, b) {
this.a = a;
this.b = b;
}
/* SOME CLASS METHODS */ }
Myclass
class Myclass extends BaseClass {
constructor() {
super();
};
/* SOME CLASS METHODS */ }
MyProblem
let test = Myclass('dog', 'cat');
However, this doesnt seem to work. Why does the Myclass-constructor not initialize the BaseClass constructor? When i look at the debugger for this.a and this.b, this values are undefined.