Created
January 31, 2015 12:10
-
-
Save jsam/8fe8caa18e616388f225 to your computer and use it in GitHub Desktop.
what it will print out?
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