function sumInput() {
let array = [];
let arraySum = 0;
for (let i = 0; i < Infinity; i++) {
array[i] = +prompt("Value", 0);
if (array[i] == '') {
break;
}
arraySum += array[i];
}
return arraySum;
}
console.log(sumInput());