From f33f93fb29c4defbcea7005a6b072c227a45a39e Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Wed, 4 Nov 2026 21:45:47 -0500 Subject: [PATCH] hash-map: Fix initial array capacity typo. The previous code was creating an array with a single undefined element. --- workloads/hash-map/hash-map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workloads/hash-map/hash-map.js b/workloads/hash-map/hash-map.js index 7f4d7462..154ff842 100644 --- a/workloads/hash-map/hash-map.js +++ b/workloads/hash-map/hash-map.js @@ -372,7 +372,7 @@ var HashMap = (function() { this._capacity = calculateCapacity(capacity); this._elementCount = 0; - this._elementData = new Array(this.capacity); + this._elementData = new Array(this._capacity); this._loadFactor = loadFactor; this._modCount = 0; this._computeThreshold();