-
-
Save bernar83/229c34a087c7a51d882e2ab9a0d4a2c2 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
function sayName() { | |
console.log(this.name); | |
} | |
var obj = { | |
name: 'Adrian', | |
sayName: sayName | |
}; | |
var bar = obj.sayName; | |
var name = 'Gotcha'; | |
bar(); // "Gotcha" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment