手把手教你实现三种绑定方式(call、apply、bind)
摘要:关于绑定首先要说下this的指向问题。 我们都知道: 函数调用时this指向window 对象调用函数时this指向对象本身 看下面得例子: // 1 function test(){ const name = 'test1'; console.log(this.name) } constname
阅读全文
posted @ 2021-06-08 22:34
浙公网安备 33010602011771号