Update sumAll-solution.js
This commit is contained in:
parent
415ff48c20
commit
3ecdab9531
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue