Last active
August 29, 2015 14:14
-
-
Save jsam/898f1c19bd2ca3013001 to your computer and use it in GitHub Desktop.
what is the output?
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
var fullname = 'Samuel'; | |
var obj = { | |
fullname: 'Alexandar', | |
prop: { | |
fullname: 'Alessio', | |
getFullname: function() { | |
return this.fullname; | |
} | |
} | |
}; | |
console.log(obj.prop.getFullname()); | |
var test = obj.prop.getFullname; | |
console.log(test()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment