I need a 2D array that is a fixed length in one dimension and variable length in the other. In other words, I need a fixed-length array with 8 elements, each of which is a variable-length array. These variable arrays start out empty, so their lengths would initially be zero. I’m translating some old Director/Lingo code, and it’s trivial to do it there.
I normally use lists when I need variable length, but you can’t create an empty, fixed-size list. Can you? If so, I can’t figure out how. Or maybe a JS array of lists? None of those things seem to work.
The only solution I can see right now is to use 8 separate lists, but there are several of these and that would really complicate things (like no more loops). Any suggestions?