code: function bind (obj, method) {
      var fn = obj[method];
      obj[method] = function () {
        fn.apply(obj, arguments);
      };
    }
docs: Bind a method to an object, so it doesn't matter whether you call object.method() directly or pass object.method as a reference to another function.