题解 | #_bind函数#
Function.bind
http://www.nowcoder.com/practice/ecad0164931847f78c55278cee56e544
Function.prototype._bind = function(context){
context = context || window;
let fn = this;
let args = [...arguments].slice(1);
return function(){
return fn.call(context, ...args, ...arguments);
}
}