Skip to content

Instantly share code, notes, and snippets.

@SmolinPavel
Created July 28, 2021 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SmolinPavel/d9d5814cf3185045bbee21ca0cde18e9 to your computer and use it in GitHub Desktop.
Save SmolinPavel/d9d5814cf3185045bbee21ca0cde18e9 to your computer and use it in GitHub Desktop.
var fullname = 'John Doe';
var obj = {
fullname: 'Colin Ihrig',
prop: {
fullname: 'Aurelio De Rosa',
getFullname: function () {
return this.fullname;
},
},
};
console.log(obj.prop.getFullname());
const 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