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
Reference: https://developer.mozilla.org/pl/docs/Web/JavaScript/Reference/Classes
class Animal { constructor(sound) { this.sound = sound; } say() { return `This animal does ${this.sound}`;} }; const dog = new Animal('bark'); console.log(dog.say());