bradxr
8/5/2018 - 11:26 PM

Understand the Prototype Chain

All objects in JavaScript (with a few exceptions) have a prototype An object's prototype is itself an object Since a prototype is an object, it can have it's own prototype

function Bird(name) {
  this.name = name;
}
typeof Bird.prototype; // => object


Object.prototype.isPrototypeOf(Bird.prototype);
// returns true