Skip to content

Commit b08e47e

Browse files
committed
docs(array): fixed ruanyf#868
1 parent c00389a commit b08e47e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/array.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ function ArrayOf(){
546546

547547
## 数组实例的 copyWithin()
548548

549-
数组实例的`copyWithin`方法,在当前数组内部,将指定位置的成员复制到其他位置(会覆盖原有成员),然后返回当前数组。也就是说,使用这个方法,会修改当前数组。
549+
数组实例的`copyWithin()`方法,在当前数组内部,将指定位置的成员复制到其他位置(会覆盖原有成员),然后返回当前数组。也就是说,使用这个方法,会修改当前数组。
550550

551551
```javascript
552552
Array.prototype.copyWithin(target, start = 0, end = this.length)
@@ -555,8 +555,8 @@ Array.prototype.copyWithin(target, start = 0, end = this.length)
555555
它接受三个参数。
556556

557557
- target(必需):从该位置开始替换数据。如果为负值,表示倒数。
558-
- start(可选):从该位置开始读取数据,默认为 0。如果为负值,表示倒数
559-
- end(可选):到该位置前停止读取数据,默认等于数组长度。如果为负值,表示倒数
558+
- start(可选):从该位置开始读取数据,默认为 0。如果为负值,表示从末尾开始计算
559+
- end(可选):到该位置前停止读取数据,默认等于数组长度。如果为负值,表示从末尾开始计算
560560

561561
这三个参数都应该是数值,如果不是,会自动转为数值。
562562

0 commit comments

Comments
 (0)