From e2738642a732826babee4d038967187494e95a8b Mon Sep 17 00:00:00 2001 From: Morthiner <88753185+Morthiner@users.noreply.github.com> Date: Tue, 1 Feb 2022 09:10:28 -0400 Subject: [PATCH] Fix the for loop Changing the for loop's condition so that it can fit the tests --- sumAll/sumAll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sumAll/sumAll.js b/sumAll/sumAll.js index 785abdb..d927b7b 100644 --- a/sumAll/sumAll.js +++ b/sumAll/sumAll.js @@ -7,7 +7,7 @@ const sumAll = function(min, max) { max = temp; } let sum = 0; - for (let i = min; i < max + 1; i++) { + for (let i = min; i <= max + 1; i++) { sum += i; } return sum;