Javascript – Why I can't use 'super' in prototype method definition when I can use Object.getPrototypeOf(this.constructor.prototype)?
So I tested this code: class C1 {} C1.prototype. f =function(){ return 1 } class C2 extends C1 {} C2.prototype. f =function(){ return super.f()+1 } And it throws a syntax error: 'super' keyword unexpected here. But if I do: C2.prototype.…