问题
(function() {
console.log("我拿我自己的 this", this);
}());
(() => {
console.log("我怎么拿我自己的 this?");
})(); 本文研究 JavaScript 中立即执行函数表达式 (IIFE) 与 `this` 指向的问题,并分析两种不同写法下 `this` 的值。
(function() {
console.log("我拿我自己的 this", this);
}());
(() => {
console.log("我怎么拿我自己的 this?");
})();