Monday, March 25, 2013

Elegant Code » Basic JavaScript: Prototypical Inheritance vs. Functional Inheritance

Elegant Code » Basic JavaScript: Prototypical Inheritance vs. Functional Inheritance: "In ‘classical’ programming languages, one class can directly inherit from another class. JavaScript doesn’t have this notion of classes (yet). Instead, JavaScript has prototypes which you can augment to fit your own needs. This means that having a single augmented object as the prototype for other objects, which ‘inherit’ all members of the augmented prototype object, kind of simulates a pseudo-classical inheritance pattern. Let’s talk code in order to demystify this concept."

'via Blog this'