Vote up, vote down. It doesn't matter which - just vote! Login and vote now.
By david_shariff
via davidshariff.com
Published: Feb 09 2012 / 01:07
In this post, I am going to introduce to you 3 different ways of how you can implement inheritance in JavaScript, the prototypal, pseudoclassical and functional patterns. You will see inheritance implemented in languages such as Java by allowing a class to inherit state and behavior from a superclass, where each superclass can have many subclasses. This means that in Java an object is an instance of a class, which can inherit other classes. Now in JavaScript, being prototypal by nature, an object can inherit from an object.
Tweet
SaveShareSend
Tags: javascript



Add your comment