mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
fix(class): edit class/super
This commit is contained in:
@@ -223,7 +223,7 @@ baz // "aaa"
|
||||
foo // error: foo is not defined
|
||||
```
|
||||
|
||||
上面代码中,真正被赋值的是变量`baz`,而不是模式`foo`。
|
||||
上面代码中,`foo`是匹配的模式,`baz`才是变量。真正被赋值的是变量`baz`,而不是模式`foo`。
|
||||
|
||||
注意,采用这种写法时,变量的声明和赋值是一体的。对于`let`和`const`来说,变量不能重新声明,所以一旦赋值的变量以前声明过,就会报错。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user