摘要:
首先看一段代码: let obj = { x: 100 }; function fn(y) { this.x += y; console.log(this); } 现在有一个需求:在1秒后,执行函数fn,并让其this指向obj。 如果写成 setTimeout(fn, 1000); 这么写的话,f 阅读全文
posted @ 2020-02-13 13:32
1800000000nm
阅读(398)
评论(1)
推荐(0)
2020年2月13日