passed first test

This commit is contained in:
Fredrik Uddenfeldt 2023-05-20 22:10:25 +02:00
parent 22ca4f4958
commit a7d8f414ff
1 changed files with 3 additions and 4 deletions

View File

@ -10,16 +10,15 @@
const sumAll = function(x, y) { const sumAll = function(x, y) {
let theSum; let theSum;
for (let i = x; i <=y; i++) { for (let i = x+1; i <=y; i++) {
x += i theSum = x += i
} }
console.log(theSum) return(theSum)
}; };
sumAll(1,10)
// Need to add conditions for ERROR-message // Need to add conditions for ERROR-message