diff --git a/codes/javascript/chapter_hashing/array_hash_map.js b/codes/javascript/chapter_hashing/array_hash_map.js index 056a8007e..f5c77aa2b 100644 --- a/codes/javascript/chapter_hashing/array_hash_map.js +++ b/codes/javascript/chapter_hashing/array_hash_map.js @@ -14,7 +14,7 @@ class Entry { /* 基于数组简易实现的哈希表 */ class ArrayHashMap { - #bucket + #bucket; constructor() { // 初始化一个长度为 100 的桶(数组) this.#bucket = new Array(100).fill(null); diff --git a/docs/chapter_hashing/hash_map.md b/docs/chapter_hashing/hash_map.md index c441c7187..61f4c2293 100644 --- a/docs/chapter_hashing/hash_map.md +++ b/docs/chapter_hashing/hash_map.md @@ -539,7 +539,7 @@ $$ /* 基于数组简易实现的哈希表 */ class ArrayHashMap { - #bucket + #bucket; constructor() { // 初始化一个长度为 100 的桶(数组) this.#bucket = new Array(100).fill(null);