Lesson Code: http://www.developphp.com/video/JavaScript/Inheritance-Tutorial-Object-Oriented-Class-Programming
In all programming languages that sport object oriented features there is a concept known as “Inheritance”. Inheritance is when an object inherits all of the properties and methods of its parent object, to become a specialized version of the parent object. In JavaScript we use the prototype property to establish subclasses that inherit the characteristics of our parent classes. This results in a specialized subclass that can retain its own properties and methods, as well as inherit all of the properties and methods of the parent class.
Original source
28 responses to “JavaScript Inheritance Tutorial Object Oriented Class Programming”
Clear, concise and to the point!
Very clear and easy to understand, thanks!
Thank you, very very well and SIMPLE explained !
Thanks Adam! good way of presenting to users like me…
Thank you alot!
Thanks great video.
Very nice video! Especially, for demonstrating how an inherited parent's property/method in a child can be overwritten, so that this property/method is different in the parent and in the child.
Finally someone knows how to explain something via a simple example. Most of the tutorials which I have seen till now used unnecessarily lengthy and complex example and ending up confusing more. Good work. Keep it up.
You are awesome dude, thank you.
Thank you for making a tutorial that gets right to the point and one that doesn't make us watch you take ten seconds to type something (I'm referring to the pastes you had ready on your clipboard). And thank you for not telling stupid jokes. This is the first tutorial I have found on YouTube, and I have seen many of them, in which I did not scoff or roll my eyes over the author taking the long way to explain something. I'm also impressed that you did have any filler sounds for pauses like "um" or ahh". Very well done. Thank you.
By far the best example I have seen.
Excellent tutorials. Thanks Adam.
Thanks! I can finally understand this concept.
It's very easy to do mannn…:) Bye..Bye..:P 😀
In addition to prototype one can use the Call property as well along with prototype to achieve inheritance and overriding
Thanks! it was great!
Adam – Thank you. This is one of the best lessons I've seen on inheritance.
try doing this on python it will break. LOLs. But yes javascript is way more forgiving thanks.
Thanks great explanation!
clearly explained the inheritance Thanks !!
That's good to know how prototyping a new child class method/property with the same name as one in a parent class will override it. Thanks for the great info!
That's also cool about the instanceof method.
Cool, that makes sense how the child class inherits all the functionality of the parent just like adding heal in the last video.
Hello, nice videos but can you make one for how to emulate private/public methods and properties in JS? Thanks.
Nice tutorial. However, it's 2015 and I've been heavily allergic to javascript alert's for over 10 years now 🙂
Can we use –var childclass = Object,create(ParentClass), in this way also can access parentclass methods and prosperity right?
Adam is the king! Thank you Adam! 🙂
Thanks Adam, You are awesome. I was strugling with OOP in JS for long time but you made it as simple as it can be…