Function.prototype.mybind = function(t){
let self = this// this为调用的函数
let args = [...arguments]// 为传入的所有参数
let value = args.shift() // 第一个参数
return function(){
self.apply(value,args)// 返回一个this指向改变的函数
}
}
function a(){
let c =this
let b = [...arguments]
console.log(c,b);
}
let x = a.mybind({x:'2'},11,2,3,'4','5',{5:'12'},'66','657')
x()