+ 1
I don't understand this exercise of javascript, help!
can someone explain to me why the output is equal to 6? var x=[1,2,4,1]; var sum=0; for (var i=0;i<x.length-1;i++) { sum+=x[i]; } document.write(sum);
5 Respuestas
+ 1
Yes, it's seven, I was wrong to write the question! thanks for your answers, did not know that the value of "sum" also changed! thanks!