passed first test
This commit is contained in:
parent
22ca4f4958
commit
a7d8f414ff
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue