+ 3

Want to know more about for loops....

We know that the syntax of the for loop is, for(<initialization>; <condition test>; <updation>) {} But what if I change this and try to do the following, for(<updation>; <initialization>; <condition test>) {} will this work fine?

24th Dec 2017, 4:58 PM
Çůřîöş ßąšäñț 🇮🇳
Çůřîöş ßąšäñț 🇮🇳 - avatar
2 Answers
+ 1
As through best of my knowledge, we can alter the position of 'initialization' and 'updation' but not 'condition test'...
25th Dec 2017, 5:56 AM
Çůřîöş ßąšäñț 🇮🇳
Çůřîöş ßąšäñț 🇮🇳 - avatar
0
No, as long as I know the structure of a 'for' loop is determined and unchangable as you mentioned first. Else, the app would behave like the for statement doesn't exist.
24th Dec 2017, 5:09 PM
Ledio Deda
Ledio Deda - avatar