Mar 08
Prototypal inheritance in JavaScript
In JavaScript we do not have typical class based inheritance. Which should not frighten you! Prototypal style inheritance can be very expressive and easy to use.
All JavaScript objects have a prototype object, including 'Object' itself. The way you inherit from another object in JavaScript can be tricky so we are going to add a create(object) method to make it easier on us. I know the word object is being thrown around a lot, but that's because almost everything in JavaScript is an object!
floating point park