+ 2

Can anyone tell me how output 10 of below code.i don't get it.

var count=0; for(i=0;i<3;i++) { for(j=3;j>0;j--) { ++count; } } alert(++count);

24th Jun 2017, 6:01 PM
S@Ā¢#in S#iĀ£Kā‚¬
3 Answers
+ 16
2 Nested loops with max value each at 3.. Thus count value after loops is 3*3. alert(++count) though increments count once before alerting (9+1=10).....
24th Jun 2017, 6:04 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
thanks..
24th Jun 2017, 6:11 PM
S@Ā¢#in S#iĀ£Kā‚¬
+ 1
nice job
25th Jun 2017, 3:26 PM
ogunyemi luqman
ogunyemi luqman - avatar