View Single Post
Old 01-29-2013, 07:44 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,579
Thanks: 62
Thanked 4,063 Times in 4,032 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
I didn't say it's not recommended. It's a tiny bit more overhead and isn't needed for an array where the elements occur in numerical sequence. So, as I said, we *normally* use an index in a loop. But clearly "for...in..." it is needed when the elements aren't numbered.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote