Compare commits

..

1 commit

Author SHA1 Message Date
qinmu
f33b254f79
Merge dbad1087b1 into 2737357242 2024-09-12 12:25:04 -04:00

View file

@ -70,7 +70,7 @@ class MyList {
remove(index) {
if (index < 0 || index >= this.#size) throw new Error('索引越界');
let num = this.#arr[index];
// 将索引 index 之后的元素都向前移动一位
// 将索引 index 之后的元素都向前移动一位
for (let j = index; j < this.#size - 1; j++) {
this.#arr[j] = this.#arr[j + 1];
}