var f = function () {
debugger;
console.log(this);
}();
(function (root) {
(function () {
debugger;
console.log(this);
var f = function () {
debugger;
console.log(this);
}();
}).call(root);
})(typeof window !== 'undefined' ? window : globalThis);
-----
这段代码在微信开发者工具模拟器上分别输出 `undefined`、`${typeof window}`、`undefined`;但在 Chrome、NodeJS 上都输出 `${typeof globalThis}`。
严格模式的区别