function f1()
{
console.log(this);
console.log(1);
}
function f2(){
console.log(this);
console.log(2)
}
f1.call.call(f2); //Window,2
今天研究了一下call,但是f1.call.call(f2); //Window,2
这里实在是有点不懂,为啥是这样的结果勒?
求大神解析。
6 回复
method.call(f1) ~= f1.method();
Function.prototype.call ~= f1.call ~= f2.call;
f1.call.call(f2); ~= Function.prototype.call.call(f2) ~= f2.call();