+ 1

I failed this...

what is the answer for this var sum=o for(i=4; i<8) if(i==6) continue; sum+=i document.write(sum)......

18th Mar 2017, 4:01 PM
Kelvine De Danielo
Kelvine De Danielo - avatar
2 odpowiedzi
+ 6
* you write the for loop without the after condition. Assuming the for loops is like this : for(i=4;i<8;i++). The answer is 16. it will executed like this: i=4, then sum = 0+4 = 4 i=5, then sum = 4+5 = 9 i=6, skipped i=7, then sum = 9+7 = 16
18th Mar 2017, 4:11 PM
Dadang NH
Dadang NH - avatar
+ 1
thanks a lot..nw i see a bit clearly
18th Mar 2017, 4:13 PM
Kelvine De Danielo
Kelvine De Danielo - avatar