Can you access and change a class member of a grandparent class without using get-set and Reflect.set?
I tried this code but it doesn’t seem to work:
class Grandparent{
classMember = null;//Define the class member
constructor(){
this.classMember = true;
}
}
class Parent extends Grandparent{
constructor(){
super();
}
}
class Child extends Parent{
constructor(){
super().classMember = false;
}
}
Is there any way you can do this without tampering with the parent class or grandparent class, or i.e, access and set the class member(s) inside the child class?