0
Conditionals and Loops: Break & Continue
Why does this code output 16? var sum=0; for(i=4; i<8; i++) { if (i == 6) { continue; } sum += i; } document.write(sum);
1 Resposta
+ 3
Because in the loop the step i = 6 is skipped with continue statement. So the sum = 4 + 5 + 7 = 16.