What is the right/best way to extend a javascript class so Class B inherits everything from the class A (class B extends A)?
What is the right/best way to extend a javascript class so Class B inherits everything from the class A (class B extends A)?
Take a look at Simple JavaScript Inheritance and Inheritance Patterns in JavaScript.
The simplest method is probably functional inheritance but there are pros and cons.
Douglas Crockford has some very good explanations of inheritance in JavaScript: