function getSumOfRange(start, end) {
let result = start;
let current = start;
for (let i = ; i < end; i++) {
if (start === end) {
return start;
} else {
current = current + 1;
result += current;
}
}
return result;
}
getSumOfRange(1, 10);
function sumNumbers(start, end) {
let sum = 0;
for (let i = start; i <= end; i++) {
sum = sum + i;
}
return sum;
}
console.log(sumNumbers(-5, 5)); // выводит 0