How do I implement inheritence in Javascript? I am getting started with Knockout.js and implementing ViewModels/page. However I have some functions/code that I want it shared across all ViewModels.
I was wondering how do I implement inheritence in this case?
Inheritance might not necessarily be the answer. Why not create an object literal with all the methods that each ViewModel should implement. I am unfamiliar with knockout, but here’s how you might do it in native js.