0

output of this code? explaination please

Can someone explain this one. Answer is 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);

26th Mar 2019, 3:41 PM
Aziz Bassim
Aziz Bassim - avatar
1 Réponse
0
When i=4, sum=0+4=4 i=5, sum=4+5=9 i=6, jump to 7 i=7, sum=9+7=16 End
26th Mar 2019, 4:24 PM
Akshay Karande