Sync zh and zh-hant versions. (#1523)

This commit is contained in:
Yudong Jin
2024-09-28 09:28:44 +08:00
committed by GitHub
parent dedb4aaced
commit 5849ae4ada
11 changed files with 58 additions and 92 deletions

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];
}