1
JavaScriptIntermediate#oop#es6
Every object has an internal link to a prototype object. Property lookups walk that prototype chain until found or until null, which is how methods are shared between instances.
function Animal(name){ this.name = name; }
Animal.prototype.speak = function(){ return this.name + ' speaks'; };
const d = new Animal('Rex');
d.speak(); // 'Rex speaks'
Object.getPrototypeOf(d) === Animal.prototype; // true