8000 Update sumAll-solution.js · gitwinst/javascript-exercises@3ecdab9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ecdab9

Browse files
authored
Update sumAll-solution.js
1 parent 415ff48 commit 3ecdab9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

05_sumAll/solution/sumAll-solution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const sumAll = function (min, max) {
44
if (min > max) [min, max] = [max, min];
55

66
let sum = 0;
7-
for (let i = min; i < max + 1; i++) {
7+
for (let i = min; i <= max; i++) {
88
sum += i;
99
}
1010
return sum;

0 commit comments

Comments
 (0)
0