From 09de87724b719ba5a7cf0830fcf30f05cd2831a4 Mon Sep 17 00:00:00 2001 From: Daniel Mossaband Date: Wed, 13 Jul 2022 21:57:19 -0700 Subject: [PATCH] Update 11-Container-With-Most-Water.js Add forgotten `const` --- javascript/11-Container-With-Most-Water.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/11-Container-With-Most-Water.js b/javascript/11-Container-With-Most-Water.js index 11b35406d..e03b11da0 100644 --- a/javascript/11-Container-With-Most-Water.js +++ b/javascript/11-Container-With-Most-Water.js @@ -8,7 +8,7 @@ var maxArea = function(height) { let j = height.length - 1; while (i < j) { - curr = (j - i) * Math.min(height[i], height[j]); + const curr = (j - i) * Math.min(height[i], height[j]); max = Math.max(curr, max); if (height[i] > height[j]) { j--;