## Notes This is JavaScript's inheritance mechanism. - What is a Prototype - How does the Prototype Chain work - How to set the prototype for an object ## Prototype Chain ```javascript const myObject = { city: "Madrid", greet() { console.log(`Greetings from ${this.city}`); }, }; ``` Now type `myObject.` and look at the autocomplete options. ```javascript __defineGetter__ __defineSetter__ __lookupGetter__ __lookupSetter__ __proto__ city constructor greet hasOwnProperty ... ``` These extra properties come from its prototype, and with it, a variety of built-in properties. ## Reference - [[JavaScript Study MOC]]