0
While loops
What is the difference between while loops and repeat-while ? Or are they the same?
1 Answer
+ 1
Rsponding if they are the same question:
Yes and No.
In code While will test your condition first and execute the loop after.
Repeat-while execute the loop first and after will check condition.
So the key difference its that repeat-while will always execute at least one time.
Now if you look in low level they are basically the same. Choose between those its more a design choice because its always possible write the same code with the two structures.