1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-25 19:22:21 +00:00

fix: IIFE 不一定是匿名

(function a() {
  console.log('aaa');
}());
This commit is contained in:
xhlwill 2016-12-04 02:49:08 +08:00 committed by GitHub
parent 366c4ddfb5
commit eba11dd8c7

View File

@ -255,7 +255,7 @@ ES6允许块级作用域的任意嵌套。
}}}};
```
块级作用域的出现,实际上使得获得广泛应用的立即执行匿名函数IIFE不再必要了。
块级作用域的出现实际上使得获得广泛应用的立即执行函数IIFE不再必要了。
```javascript
// IIFE写法