Created
November 17, 2018 14:31
-
-
Save quocnguyen/5a04b2c1af4278a6385861028fd0a253 to your computer and use it in GitHub Desktop.
This file contains 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
// Fix required to have obj.prop.getFullname function to print out "Embrace-it"? | |
let fullname = 'Developer A' | |
let obj = { | |
fullname: 'Developer B', | |
prop: { | |
fullname: 'Embrace-it', | |
get getFullname() { | |
return this.fullname | |
} | |
} | |
} | |
console.log(obj.prop.getFullname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment