mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-26 03:32:20 +00:00
Update and rename object.md to object2.md
处理数组 这里写反了
This commit is contained in:
parent
67f9495d64
commit
09a72af364
@ -460,7 +460,7 @@ Object.assign([1, 2, 3], [4, 5])
|
||||
// [4, 5, 3]
|
||||
```
|
||||
|
||||
上面代码中,`Object.assign`把数组视为属性名为0、1、2的对象,因此目标数组的0号属性`4`覆盖了原数组的0号属性`1`。
|
||||
上面代码中,`Object.assign`把数组视为属性名为0、1、2的对象,因此源数组的0号属性`4`覆盖了目标数组的0号属性`1`。
|
||||
|
||||
### 常见用途
|
||||
|
Loading…
x
Reference in New Issue
Block a user