{}
run-icon
main.js
function sumAll(arrOf) { minNum = Math.min(...arrOf); maxNum = Math.max(...arrOf); let sum = 0; for (let i = minNum; i <= maxNum; i++) { sum += i; }; return sum; } console.log(sumAll([1,4]))
Output