Hi folks,
I am stuck while trying to implement classical pattern mainly to learn best practices in js. I am not able to understand why my call to inherit method fails? Any help is much appreciated. Sorry for any layman's mistake.
Below is program.
I would argue (though there may be those would disagree with me) that what you are attempting to do here is far from a "best practice" in JavaScript. Trying to implement classical inheritance in JavaScript is not natural nor native to JavaScript. Just look how complex your code is to do something that's actually quite simple in concept.
I prefer to let JavaScript be JavaScript and not try to shoehorn unnatural concepts from other language into it.