I was trying to create an array which contains 3 fixed fields.
So, something like
var x0 = new Array(x,y,z);
Now the thing is there can be multiple arrays like x[], which have the different values.
So something like
var x1 = new Array(x,y,z); x2 = new Array(x,y,z);
I would be passing values to the variables x,y,z like x0[0] = "test", x0[1] = "another",...
I need to create a variable number of such arrays, so say if i pass a value say 10, it should create 10 different arrays for me. How does one do this, is it allowed to use a loop for creating variables?
There is something called as multi dimensional array, but I wasn't sure of how to use it. I tried but apparently it is very different and I did not understand it. Also, I thought of declaring an object, and passing values to it's parameters, and create objects as needed. Is this possible? And which method will be better?
Is there any other way of doing this? maybe something which would be most efficient?