Completed the fifth exercise
This commit is contained in:
parent
49743d45ee
commit
8800dd93ae
05_sumAll
|
@ -1,5 +1,11 @@
|
|||
const sumAll = function() {
|
||||
const sumAll = function(num1, num2) {
|
||||
let sum = 0;
|
||||
|
||||
for (let i = num1; i <= num2; i++) {
|
||||
sum += parseInt(i);
|
||||
}
|
||||
|
||||
return sum;
|
||||
};
|
||||
|
||||
// Do not edit below this line
|
||||
|
|
Loading…
Reference in New Issue