Last active
May 29, 2020 11:36
-
-
Save AregSargsyan/a4642b0746970b5cf06272ef8606f40e to your computer and use it in GitHub Desktop.
Bind context
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
let sayHi = { | |
message: 'HI', | |
say: function() { | |
console.log(this.message); | |
} | |
}; | |
setTimeout(sayHi.say.bind(sayHi)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment