I have declared a two-dimensional array, like so:
a = [[]] However, when I try to give a second dimension value using a first dimension index other than 0, it doesn't work:
a[1][0] = "foo" //returns error Is there a better way around this than manually defining every index you need as an array, i.e.:
a[1] = []; a[2] = []; a[3] = []; //et cetera
a[0][0] = xshould work. What error is it returning?a[0][0] = xwill work buta[1][0] = xwon't.