0

I want to generate arrays. How? Also I want multi-dimensional arrays.

var something = new Array; for (n=0; n < 5; n++){ /*what do we put here to put to generate arrays in the array something?*/ }

27th Oct 2019, 4:20 PM
Bright Lin
Bright Lin - avatar
3 Answers
0
You can try something.push([]); It just adds an empty array each time.
27th Oct 2019, 4:25 PM
Russ
Russ - avatar
0
Thank you! So I put an array, then I put data in it after by doing : something[index of first array][the index of the generated array]. Right?
27th Oct 2019, 5:15 PM
Bright Lin
Bright Lin - avatar
0
You got it! Never be afraid to try things out yourself - you learn so much more that way. And it's so much quicker than asking on here and waiting for a reply.
27th Oct 2019, 5:34 PM
Russ
Russ - avatar