I have two classes in Javascript like this:
class Parent {
constructor(){
console.log(typeof this);
}
}
class Child extends Parent {
constructor(){
super();
}
}
In the Parent class, I would like to know what class instantiated it. However, typeof just returns object. Is there any other way to solve this?