Skip to content

Commit 3e32b88

Browse files
committed
docs(array): fixed #22
1 parent 2a3dfdf commit 3e32b88

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/array.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -881,9 +881,7 @@ sentence.at(100) // undefined
881881

882882
## 实例方法:toReversed(),toSorted(),toSpliced(),with()
883883

884-
很多数组的传统方法会改变原数组,比如`push()``pop()``shift()``unshift()`等等。数组只要调用了这些方法,它的值就变了。现在有一个[提案](https://github.com/tc39/proposal-change-array-by-copy),允许对数组进行操作时,不改变原数组,而返回一个原数组的拷贝。
885-
886-
这样的方法一共有四个。
884+
很多数组的传统方法会改变原数组,比如`push()``pop()``shift()``unshift()`等等。数组只要调用了这些方法,它的值就变了。[ES2023](https://github.com/tc39/proposal-change-array-by-copy)引入了四个新方法,对数组进行操作时,不改变原数组,而返回一个原数组的拷贝。
887885

888886
- `Array.prototype.toReversed() -> Array`
889887
- `Array.prototype.toSorted(compareFn) -> Array`

0 commit comments

Comments
 (0)