Why does y
in second for
not "run"?
var i = 0;
var bd = new Array();
bd[i++] = new Array(10,11,'Daniel');
bd[i++] = new Array(12,12,'Augusto');
bd[i++] = new Array(13, 12, 'Olavo');
Notice that I run the coordinates of this two-dimensional array in x
and y
- a double loop:
for (x=1 ; x<=i ; x++){
for(y=0 ; y<=2; y++){
alert(y);
if (y=10){ document.write(bd[x][y]);
// O Retorno é 10,11,'Daniel'
}
}
}
I put an "alert" to see that the value does not go out of zero. Can anyone help me?