Function.prototype.myCall = function(context,…arr){
context = context || window
context.Fn = this;
let result = context.Fn(…arr)
delete context.Fn
return result
}
手写call
最新推荐文章于 2025-08-05 17:55:38 发布
Function.prototype.myCall = function(context,…arr){
context = context || window
context.Fn = this;
let result = context.Fn(…arr)
delete context.Fn
return result
}