Created
August 9, 2023 15:43
-
-
Save suhailgupta03/149e757b6258d7875854f5a08acfe28d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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