For loop vs While loop

Sep 14, 2012 at 2:43am
Hi,

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

Thanks,
Chuck James
Sep 14, 2012 at 3:00am
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 Sep 14, 2012 at 3:00am
Sep 14, 2012 at 3:03am
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.