Skip to content
Advertisement

Tag: ecma

Isn’t polymorphism works wrong in JS ES

I’m currently working on a browser extension to manage opened tabs and I notice that in JS ES polymorphism works a bit strange when I declare class fields at the top of the class. Let say that we want to use polymorphism in object initialization. E.g. we have base class View: and derived class TabView: Now lets try to call

Advertisement