in reply to Style and Preference on Loops
I use a mix of both. If I need to know the actual index in the loop for something I'm doing, the first works. If I'm just iterating over the elements and don't necessarily need to know the index, I use the second.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Style and Preference on Loops
by chromatic (Archbishop) on Aug 12, 2011 at 17:43 UTC | |
|
Re^2: Style and Preference on Loops
by GrandFather (Saint) on Aug 12, 2011 at 23:24 UTC | |
by eyepopslikeamosquito (Archbishop) on Aug 12, 2011 at 23:53 UTC |