mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-29 13:52:22 +00:00
docs(module-loader): delete #607
This commit is contained in:
parent
b87ae6e703
commit
d569703fb4
@ -89,8 +89,6 @@ const x = 1;
|
||||
|
||||
console.log(x === window.x); //false
|
||||
console.log(this === undefined); // true
|
||||
|
||||
delete x; // 句法错误,严格模式禁止删除变量
|
||||
```
|
||||
|
||||
利用顶层的`this`等于`undefined`这个语法点,可以侦测当前代码是否在 ES6 模块之中。
|
||||
|
Loading…
x
Reference in New Issue
Block a user