Created
February 14, 2015 20:51
-
-
Save hannesvdvreken/e2e5d8249a9e9176640c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 helper(arg1, callback, context) { | |
// do something… | |
callback.call(context, data); | |
} | |
obj = { | |
name: 'John Doe', | |
bar: function() { | |
helper('foo', function(data) { | |
console.log(this); | |
}, this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment