0
Please help with increment. In increment it always add one number buy why in the loop adding 2 number
var i=1 for(k=1; k<=10; k++) { document.write(k+=i, "</br>"); }
2 ответов
0
'k' itself is incremented after each iteration and to that you are adding 1 so it will be incremented by 2 in total.
0
Thanks