I have to iterate through an object of objects with a for-loop.
I want to start the iteration at an index in the middle of the array - I don't want to start with the first element.
for(var i=elementId in this._uiElementsData)
{
cont++;
if(cont == 1)
{
var element = this._uiElementsData[i];
uno = element.uiElementIndex;
}
else if(cont == 2)
{
var element = this._uiElementsData[i];
dos = element.uiElementIndex;
}
else if(cont > 2) break;
}
I tried that, but it starts with the first element of the array... What am I doing wrong?