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

Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages

This commit is contained in:
ruanyf 2015-09-30 08:42:04 +08:00
commit bde94c1e77

View File

@ -240,7 +240,6 @@ ES6允许块级作用域的任意嵌套。
```javascript
{{{{{let insane = 'Hello World'}}}}};
insane // "Hello World"
```
上面代码使用了一个五层的块级作用域。外层作用域无法读取内层作用域的变量。
@ -328,9 +327,6 @@ PI // 3.1415
PI = 3;
PI // 3.1415
const PI = 3.1;
PI // 3.1415
```
上面代码表明改变常量的值是不起作用的。需要注意的是,对常量重新赋值不会报错,只会默默地失败。