Consider this scenario:
class Parent {
propStr = "Hello";
propNum = 42;
constructor(propShared) {
console.log(this.propStr); // Hello
console.log(this.propNum); // 42
console.log(propShared); // w/e
}
}
class Child extends Parent {
propStr = "Hi"; // overridden
propNum = 1337; // overridden
constructor(propShared) {
super(propShared);
}
}
let c = new Child("Foobar");
What steps should be taken to ensure that the parent properties are correctly overridden, resulting in the console.log displaying the child's properties?