Skip to content

Instantly share code, notes, and snippets.

@ionutzp
Last active January 3, 2016 11:19
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 ionutzp/8455261 to your computer and use it in GitHub Desktop.
Save ionutzp/8455261 to your computer and use it in GitHub Desktop.
function foo() {
console.log(this.a);
}
function doFoo(fn) {
fn();
}
var obj = {
a: 2,
foo: foo
};
doFoo(obj.foo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment