1Function.prototype.bind = Function.prototype.bind || function (target) { 2 var self = this; 3 return function (args) { 4 if (!(args instanceof Array)) { 5 args = [args]; 6 } 7 self.apply(target, args); 8 }; 9}; 10 11