mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
docs(array): fix #934
This commit is contained in:
parent
4bad480d48
commit
5a465dda71
@ -204,7 +204,7 @@ a3[0] === a1[0] // true
|
|||||||
a4[0] === a1[0] // true
|
a4[0] === a1[0] // true
|
||||||
```
|
```
|
||||||
|
|
||||||
上面代码中,`a3`和`a4`是用两种不同方法合并而成的新数组,但是它们的成员都是对原数组成员的引用,这就是浅拷贝。如果修改了原数组的成员,会同步反映到新数组。
|
上面代码中,`a3`和`a4`是用两种不同方法合并而成的新数组,但是它们的成员都是对原数组成员的引用,这就是浅拷贝。如果修改了引用指向的值,会同步反映到新数组。
|
||||||
|
|
||||||
**(3)与解构赋值结合**
|
**(3)与解构赋值结合**
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user