var myinputarr = [];
var size = 5; // Array size
alert("enter number and press enter if need not mare press cancle");
myinputarr[0] = Number(prompt("Enter array Element "));
let a = 0;
let total = 0;
while (myinputarr[a] != 0) {
total = myinputarr[a] + total;
a++;
myinputarr[a] = Number(prompt("Enter array Element: "));
}
console.log(total);
find sum of number in advance mode javascript
Updated: Sep 21, 2022
留言