From c12d01a7525be8a17c705b573dac62e9104a8b81 Mon Sep 17 00:00:00 2001 From: bongbongbakudan <51266165+bongbongbakudan@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:57:34 +0800 Subject: [PATCH] Update my_list.js (#1511) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改insert注释 --- codes/javascript/chapter_array_and_linkedlist/my_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/javascript/chapter_array_and_linkedlist/my_list.js b/codes/javascript/chapter_array_and_linkedlist/my_list.js index d80b5031c..fb1f264ba 100644 --- a/codes/javascript/chapter_array_and_linkedlist/my_list.js +++ b/codes/javascript/chapter_array_and_linkedlist/my_list.js @@ -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]; }