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:
commit
47aef5bca7
@ -392,7 +392,7 @@ first // 1
|
|||||||
last // 3
|
last // 3
|
||||||
```
|
```
|
||||||
|
|
||||||
上面代码对数组进行对象结构。数组`arr`的`0`键对应的值是`1`,`[arr.length - 1]`就是`2`键,对应的值是`3`。方括号这种写法,属于“属性名表达式”,参见《对象的扩展》一章。
|
上面代码对数组进行对象解构。数组`arr`的`0`键对应的值是`1`,`[arr.length - 1]`就是`2`键,对应的值是`3`。方括号这种写法,属于“属性名表达式”,参见《对象的扩展》一章。
|
||||||
|
|
||||||
## 字符串的解构赋值
|
## 字符串的解构赋值
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user