//call函数
var xm = {
name:"xiaoming"
}
function foo(age,sex) {
console.log(this.name)
console.log(age)
console.log(sex)
return 1;
}
Function.prototype.call2 = function(obj) {
var args=[]
for(let i=1;i<arguments.length;i++){
args
菜鸟笔记:js中call、apply、bind的模拟实现
最新推荐文章于 2021-09-14 11:28:45 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)