Open houchaowei opened 5 years ago
https://houchaowei.github.io/20190807-avaScript%E6%B7%B1%E5%85%A5%E4%B9%8Bcall%E5%92%8Capply%E7%9A%84%E6%A8%A1%E6%8B%9F%E5%AE%9E%E7%8E%B0/#more
call一句话介绍 call: call() 方法在使用一个指定的 this 值和若干个指定的参数值的前提下调用某个函数或方法。 举个例子:123456789var foo = { value: 1};function bar() { console.log(this.value);}bar.call(foo); // 1
https://houchaowei.github.io/20190807-avaScript%E6%B7%B1%E5%85%A5%E4%B9%8Bcall%E5%92%8Capply%E7%9A%84%E6%A8%A1%E6%8B%9F%E5%AE%9E%E7%8E%B0/#more
call一句话介绍 call: call() 方法在使用一个指定的 this 值和若干个指定的参数值的前提下调用某个函数或方法。 举个例子:123456789var foo = { value: 1};function bar() { console.log(this.value);}bar.call(foo); // 1