+ 1
Why this ???
Why It = 16 ??? ??? ??? What is the output of this code? var sum=0; for(i=4; i<8; i++) { if (i == 6) { continue; } sum += i; } document.write(sum);
4 Respuestas
+ 4
You are adding number from 4 to 7 through for loop and if number is 6 you are skipping it by continue.
Hence
4+5+7 =16
Hope this helps ☺️☺️.
+ 2
4 gets added to sum, then 5 gets added to sum, then 6 is not and then 7 is added to sum. So sum is 16.
+ 2
seriously! thx ;)
+ 2
when value of i is 6 for loop will continued and
4+5+7=16