+ 2
Why the output can show the result until 6? As we know the conditon of loop can operate it just until var i reach the value of 5
https://code.sololearn.com/WqgmC5TjBOtb/?ref=app https://code.sololearn.com/WqgmC5TjBOtb/?ref=app
4 Respostas
+ 8
Because there's an increment inside the for loop which produce the result 6 and get printed.
After the last iteration it get incremented to 7 and the loop exits since it's greater than 5.
+ 8
Absolutely!
+ 2
So the result 6 here is the effect of incremented number by the last variable 5 as the final condition of the loop?
+ 2
Thanks a lot buddy, Jazakallahukhair