Posted By

inamorix on 05/30/07


Tagged

js


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


bind


 / Published in: JavaScript
 

  1. Function.prototype.bind = function (obj) {
  2. var fn = this;
  3. return function () {
  4. var args = [this];
  5. for (var i = 0, ix = arguments.length; i < ix; i++) {
  6. args.push(arguments[i]);
  7. }
  8. return fn.apply(obj, args);
  9. };
  10. };

Report this snippet  

You need to login to post a comment.