摘要: 首先看一段代码: let obj = { x: 100 }; function fn(y) { this.x += y; console.log(this); } 现在有一个需求:在1秒后,执行函数fn,并让其this指向obj。 如果写成 setTimeout(fn, 1000); 这么写的话,f 阅读全文