T
Thomas Mlynarczyk
Hi,
For objects (non-arrays) I can use for(i in object) to loop through all its
members. For arrays, this does not always seem to work, and I am forced to
use for(i=0; i<array.length;i++) instead. Is there a way to make an array
accessible using the for-in loop? During my experiments I found that if the
array is a member of an object, but not the first one, the for-in will
work... seems a strange behaviour to me, so I'd be grateful if someone could
shed some light on this for me.
Greetings,
Thomas
For objects (non-arrays) I can use for(i in object) to loop through all its
members. For arrays, this does not always seem to work, and I am forced to
use for(i=0; i<array.length;i++) instead. Is there a way to make an array
accessible using the for-in loop? During my experiments I found that if the
array is a member of an object, but not the first one, the for-in will
work... seems a strange behaviour to me, so I'd be grateful if someone could
shed some light on this for me.
Greetings,
Thomas