1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00
This commit is contained in:
Ruan Yifeng 2015-03-28 08:33:32 +08:00
parent 9d2ef28e22
commit 97b5d89f3b

View File

@ -158,7 +158,7 @@ bar();
上面代码中函数bar的参数func默认是一个匿名函数返回值为变量foo。这个匿名函数的作用域就不是bar。这个匿名函数声明时是处在外层作用域所以内部的foo指向函数体外的声明输出outer。它实际上等同于下面的代码。
```js
```javascript
let foo = 'outer';
let f = x => foo;