Actually declare Y = new Array() is for the top level of the array, not a 2D array. So afterwhich you've declared that, you need to declare another array inside of Y. So like,
Y = new Array();
Y[0] = new Array();
Y[1] = new Array();
Then you are allow to put data into Y[0] array. eg.
Y[0][0] = smith;
Y[0][1] = smith2;
Y[1][0] = john;
Y[1][1] = john2;
Now then you'll have a 2D array. I've gotten error not declaring new Array() for both cases. Hope this help. Cheers
| |
|
Welcome to AstaHost - Dear Guest | |



