Skip to content

Commit c12d01a

Browse files
Update my_list.js (krahets#1511)
修改insert注释
1 parent 2737357 commit c12d01a

File tree

1 file changed

+1
-1
lines changed
  • codes/javascript/chapter_array_and_linkedlist

1 file changed

+1
-1
lines changed

codes/javascript/chapter_array_and_linkedlist/my_list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class MyList {
7070
remove(index) {
7171
if (index < 0 || index >= this.#size) throw new Error('索引越界');
7272
let num = this.#arr[index];
73-
// 将将索引 index 之后的元素都向前移动一位
73+
// 将索引 index 之后的元素都向前移动一位
7474
for (let j = index; j < this.#size - 1; j++) {
7575
this.#arr[j] = this.#arr[j + 1];
7676
}

0 commit comments

Comments
 (0)