Nested Arrays - Question
Could someone help me locate documentation on how nested arrays work? This is part of a script I have, and I'm trying to figure out why/how it works:
var cost = new Array(
new Array(
new Array(), new Array(), new Array(),
new Array()
),
new Array(
new Array(), new Array(), new Array(),
new Array()
);
If this didn't line up correctly, this is one array with two arrays within it, and eight arrays inside those two.
Thanks in advance!
Flicki
John Pollock posted this at 02:20 — 3rd September 1999.
He has: 628 posts
Joined: Mar 1999
I think I saw a section on that inside
http://www.wsabstract.com
Not sure, but I think I saw it there.
Flicki posted this at 02:58 — 15th September 1999.
They have: 8 posts
Joined: Mar 1999
Thanks for the reply, John! I've been on vacation and just now saw your message.
Do you know where I can find info on three-dimensional arrays? It looks like that's what I really have. The two-dimensional info was helpful from wsabstract.com, but I need to know how the particular arrays are referred to when I use them in other variables which are part of a calculation. (For instance, my first declaration is cost[0][0][0] = 8.59; and cost[3][7][3] = 198.10; is my last declaration.
Thanks so much!
Flicki
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.