💠[[HomeObject]]
🚧 under construction

const { log } = console;
let animal = {
sayHi() { log(`I'm a 🐶`) } // [[HomeObject]] === animal
};
let rabbit = {
__proto__: animal,
sayHi() { super.sayHi() } // [[HomeObject]] === rabbit
};
let plant = {
sayHi() { log("I'm a ☘️") } // [[HomeObject]] === plant
};
let tree = {
__proto__: plant,
// (non-method syntax for objects❗)
// ----------------------------------------------------------------
// ⭐ `rabbit.sayHi` method remembers its [[HomeObject]]❗
// ⭐ `tree.sayHi` is NOT a method❗
// (just a "reference" to another method)
sayHi: rabbit.sayHi // [[HomeObject]] === rabbit
// ----------------------------------------------------------------
};
tree.sayHi();
// super.sayHi() // ⭐ in `rabbit.sayHi` method
//
// super === [[HomeObject]].[[Prototype]]
// === rabbit.[[Prototype]]
// === animal
//
// animal.sayHi() // "I'm a 🐶"Last updated