1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-28 21:32:20 +00:00

Merge pull request #811 from CosSalt/patch-5

函数内部重新声明参数
This commit is contained in:
Ruan YiFeng 2019-02-13 13:07:22 +08:00 committed by GitHub
commit b26bc37017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,14 +201,16 @@ function func() {
```javascript
function func(arg) {
let arg; // 报错
let arg;
}
func() // 报错
function func(arg) {
{
let arg; // 不报错
let arg;
}
}
func() // 不报错
```
## 块级作用域