KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 = new Animal('cat'); var dog = new Animal('dog'); cat.say(); dog.say(); It should output: meow bark
Tags (comma-separated)
Save Edits
Cancel