diff --git a/05_sumAll/solution/sumAll-solution.js b/05_sumAll/solution/sumAll-solution.js index c4b38e3..08daf58 100644 --- a/05_sumAll/solution/sumAll-solution.js +++ b/05_sumAll/solution/sumAll-solution.js @@ -4,7 +4,7 @@ const sumAll = function (min, max) { if (min > max) [min, max] = [max, min]; let sum = 0; - for (let i = min; i < max + 1; i++) { + for (let i = min; i <= max; i++) { sum += i; } return sum;