Is it possible to simulate abstract base class in JavaScript? What is the most elegant way to do it?
Say, I want to do something like: -
var cat = ne
You can create abstract classes by using object prototypes, a simple example can be as follows :
var SampleInterface = { addItem : function(item){} }
You can change above method or not, it is up to you when you implement it. For a detailed observation, you may want to visit here.