What happens with the following code?
class A {
method() {
return 'A';
}
}
class B extends A {
method() {
return 'B';
}
}
const obj = new B();
console.log(obj.method());
What happens with the following code?
class A {
method() {
return 'A';
}
}
class B extends A {
method() {
return 'B';
}
}
const obj = new B();
console.log(obj.method());