+ 2
pls explain this code!
var count = 0; for(i = 0; i < 3; i++){ for(j = 3; j>0; j--){ ++count; document.write(i + "<br>"); } } document.write(++count);
3 Answers
+ 6
If you don't know yourself after achieving the JS course, you need to redo it more closely ^^
+ 4
increment:
i++ is equivalent of i += 1 wich is equivalent to i = i+1
++i is same, but incrementation done before use of x value (if used in the left part of an assignement for example)
loop:
for (i=0; i<3; i++)
have three distinct 'arguments' part separated by semi-colon:
> i = 0; initialize a counter, done only at begin of loop
> i < 3; test of the counter, done before each iteration
> i++; incrementation or anything to do at end of each iteration
+ 2
@visph I'm learning everyday. problem is I've no teacher except w3school and sololearn. that's why frequently I asked here. if you know answer write down otherwise....