Very weird behaviour. Why does the following log "A.fn" only, the next line "B.fn" doesn't even run? What exactly is happening in this following code?
I'm using Babel stage-2, which is used in most React projects.
class A {
fn = () => {
console.log("A.fn");
}
}
class B extends A {
fn() {
super.fn();
console.log('B.fn')
}
}
new B().fn(); // why this logs "A.fn" only, while "B.fn" isn't logged?