Last active
June 20, 2021 10:05
-
-
Save ashwinkumar2438/b5fd62b8cf3d8612745387318c5626a7 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
const one={ | |
who(){return 'I am the one'} | |
} | |
const two={ | |
getRoots(){ | |
return super.who(); | |
} | |
} | |
Object.setPrototypeOf(two,one); | |
two.getRoots(); //@returns "I am the one" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment