AnsweredAssumed Answered

Javascript for(node in nodes)

Question asked by dinger on Jan 18, 2008
Latest reply on Jan 18, 2008 by jpfi
Should the following code work:

for(node in nodes)
{
    // do something with each node
}
Where nodes is, for instance, space.children?

This wouldn't work for me. I had to revert back to a bog standard loop like this:
for(var i=0;i<nodes.length;i++)
{
   var node = nodes[i];
}

Cheers

Rob

Outcomes