Skip to content

Instantly share code, notes, and snippets.

@suhailgupta03
Created August 9, 2023 15:43
Show Gist options
  • Save suhailgupta03/149e757b6258d7875854f5a08acfe28d to your computer and use it in GitHub Desktop.
Save suhailgupta03/149e757b6258d7875854f5a08acfe28d to your computer and use it in GitHub Desktop.
let livingThing = {
doesLiveInfinitely() {
console.log("I do not live infinitely.")
}
}
let animal = {
eats: true,
walk() {
console.log("Animal walks");
},
__proto__: livingThing
};
let rabbit = {
jumps: true,
__proto__: animal
}
console.log(rabbit.jumps);
rabbit.walk()
rabbit.doesLiveInfinitely()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment