Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
原来的语义容易造成误解
  • Loading branch information
JackZong committed Oct 24, 2017
1 parent 94c8bc3 commit 27ce0bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es5/README.md
Expand Up @@ -279,7 +279,7 @@
}());
```

- 永远不要在一个非函数代码块(if、while 等)中声明一个函数,把那个函数赋给一个变量。浏览器允许你这么做,但它们的解析表现不一致。
 - 永远不要在一个非函数代码块(if、while 等)中声明一个函数,浏览器允许你这么做,但它们的解析表现不一致,正确的做法是:在块外定义一个变量,然后将函数赋值给它
- **注:** ECMA-262 把 `` 定义为一组语句。函数声明不是语句。[阅读对 ECMA-262 这个问题的说明](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=97)

```javascript
Expand Down

0 comments on commit 27ce0bd

Please sign in to comment.