Fix the for loop

Changing the for loop's condition so that it can fit the tests
This commit is contained in:
Morthiner 2022-02-01 09:10:28 -04:00 committed by GitHub
parent db998d7279
commit e2738642a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;