A Guide To Prototype-Based Class Inheritance In JavaScript
Here’s a list of my best web development tutorials.
Complete CSS flex tutorial on Hashnode.
Ultimate CSS grid tutorial on Hashnode.
Higher-order functions .map, .filter & .reduce on Hashnode.
Follow me @ Twitter, Instagram & fb to never miss premium articles.
Computer languages often provide a way for one object to be inherited from
another object. The inherited object contains all properties from its parent object. In addition, it will also specify its own set of unique properties.
Creating A Logical Hierarchy Of Objects
A Dog and a Cat share similar traits. Instead of creating two different classes,
we can simply create one class Pet and inherit Cat and Dog from it. But the Pet class itself can also be inherited from the class Animal.
Before We Start
Trying to understand prototype is like crossing the river going from coding to computer language design. Two completely different areas of knowledge.