Skip to content

Instantly share code, notes, and snippets.

@CodHeK
Created June 8, 2020 16:14
Show Gist options
  • Save CodHeK/548802ad451d950cdb7e0342238bb9e0 to your computer and use it in GitHub Desktop.
Save CodHeK/548802ad451d950cdb7e0342238bb9e0 to your computer and use it in GitHub Desktop.
const obj = {
prop: 'Hello',
method: function() {
function inner() {
console.log(this.prop + ', World!'); // Hello, World!
}
inner.call(this);
}
};
obj.method();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment