Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 9, 2014 00:16
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 devdays/2c5638469149b94d9aae to your computer and use it in GitHub Desktop.
Save devdays/2c5638469149b94d9aae to your computer and use it in GitHub Desktop.
Object JavaScript - Callback bind
Function.prototype.bind = function(ctx) {
var fn = this;
return function() {
fn.apply(ctx, arguments);
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment