When I use a FOR IN loop I expect to loop throught the items in the order that they were created, but this does not seem the case.
var _obj_tables = null;
function onShow(firstShow, event) {
if(firstShow) {
_obj_tables = new Object()
_obj_tables.calls = new Array()
_obj_tables.tasks = new Array()
_obj_tables.consumers = new Array()
_obj_tables.relations = new Array()
_obj_tables.suppliers = new Array()
_obj_tables.employees = new Array()
}
}
function onAction(event) {
for(i in _obj_tables) {
application.output(i);
}
}
I would expect to see the following result:
calls
tasks
consumers
relations
suppliers
employees
But I get the items in the following order:
tasks
employees
consumers
calls
suppliers
relations
Why is this?