Created
September 26, 2015 10:21
-
-
Save qetr1ck-op/d57b779a057e164bf1d2 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 owl = { | |
sayHello(str) { | |
return `Hello ${str} !`; | |
} | |
} | |
let winnie = {}; | |
winnie.__proto__ = owl; | |
let donkey = {}; | |
donkey.__proto__ = owl; | |
console.log(donkey.sayHello('prototype chain')) // Hello ! prototype chain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment