Javascript – Setting property in class via parent constructor doesn't set property
Considering the following code class A { a; constructor() { console.log(2); this.inv(); } inv() { console.log(4); this.a = "a value"; } } class B extends A { b; constructor() { console.log(1); super(); } inv() { console.log(3); super.inv(); console.log(5); this.b =…