Iterating values using JavaScript syntax for each and for each in
// example iterating array indexes using 'for .. in'
var out1 = '';
for (i in userhome.children)
{
out1 += userhome.children[i].name + '';
}
// example iterating array values using 'for each .. in'
var out2 = '';
for each (n in userhome.children)
{
out2 += n.name + '';
}
var out = out1 + '' + out2;
out;
Another example of iterating nodes can be found in Iterate nodes in repository.
文档更新时间: 2020-02-16 16:32 作者:凌云文档