Tag Archives: inheritance

Inheritance approaches in JavaScript

We are going to develop the following case: Two classes: Base: parent class with the same structure. State: color (string type, private scope). Behavior: sayColor, returning color. Child: subclass from Base with: State: name (string type, private scope). Behavior: sayName, returning name. Instanciating of child object. If we use a “classical” OOP language like Java:… Read More »