Relative Content

Tag Archive for javascriptarraysloopssumreduce

How can i sum numbers into arrays?

const num = [13,6,2,11,23,33]; let c = 0; for (let i = 0; i <= num.length; i++) { c += num[i]; } console.log(c); //NaN I can’t sum the array with loop. I want to calculate average of the numbers… is it possibel to sum arrat with loop and without reduce()?? javascript arrays loops sum reduce […]