|
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.
|