Skip to content

Commit 5e17865

Browse files
authored
Merge pull request XPoet#19 from YangFong/patch-2
fix: 示例错误
2 parents 9cf4c22 + 2dc4c15 commit 5e17865

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/doc/02_JavaScript数据结构与算法(二)数组.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
例如:
5757
```js
5858
let myArray2 = [1, 2, 3, 4, 5];
59-
// 删除索引 4 位置起,2 个元素
60-
myArray2.splice(4, 2);
59+
// 删除索引 3 位置起,2 个元素
60+
myArray2.splice(3, 2);
6161
console.log(myArray2); //--> [1, 2, 3]
6262
```
6363

0 commit comments

Comments
 (0)