-1
I can create an array within another as follows:
var meuArray = [["1","2","3"],["4","5","6"]];
With this I can easily check the positions just by calling meuArray[x][y], where x is which array I want and y which position, for example the number two corresponds to meuArray[0][1], or the number 6 corresponds to meuArray[1][2].
So far so good, now how do I add one more array within my array? for example I have the following array:
var meuSegundoArray = ["7","8","9"];
And I want to add it to my:
meuArray=[["1","2","3"],["4","5","6"],["7","8","9"]];
I’ve tried to do:
meuArray += meuSegundoArray
did not work, as far as push.
Does anyone have any solution to this problem?
Show!! I had tested with push again and it did not work, I do not know the reason, but I tested here and it worked right, thanks Douglas!!
– Vitor Pereira