Created
November 17, 2018 14:29
-
-
Save quocnguyen/8565a2d23cb4180661ca34c0a98f8bf7 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 for "console.log(obj.prop.getFullname);" to output a string. | |
let fullname = 'Developer A' | |
let obj = { | |
fullname: 'Developer B', | |
prop: { | |
fullname: 'Embrace-it', | |
get getFullname() { | |
return fullname | |
} | |
} | |
} | |
console.log(obj.prop.getFullname) // Developer A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment