let person = {
name:'二仙桥大爷',
say(){ console.log(`我是${this.name},只能拉一点点`)}
}
let tanSer = {
name:'谭桥',
}
Function.prototype.myCall = function(context){
let that = context;
that.fn = this;
arg = [...arguments].slice(1);
let res = that.fn(arg)
delete that.fn
return res;
}
网友评论