Why is the initialization statement for "for loop" executs only once? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why is the initialization statement for "for loop" executs only once?

28th Jul 2018, 3:32 AM
Shubhangi Gupta
Shubhangi Gupta - avatar
1 Answer
0
Mam when u observe the syntàx of for loop we are assigning some value to the variable at first Then we are checking the condition if it is satisfied then the value is decreased or increased The value again is assign to the variable It continues till the condition fail so we can't assign till the condition doesn't fail
31st Jul 2018, 5:09 AM
SYED SHIREEN
SYED SHIREEN - avatar