For loop vs While loop


Which methodology is better and why, for loop or while loop.

Chuck James
They both exist because they are both useful. Depends on the situation.

While loops are more for when there's a condition that keeps getting tested.

For loops are when the task is incremental.
Last edited on
yup, its true.. it may also depend on what are you trying to do or which is more convenient for you to use..
Topic archived. No new replies allowed.