Welcome to WebmasterWorld Guest from 54.205.251.179

Forum Moderators: open

Message Too Old, No Replies

Multi-dimensional Arrays

In JavaScript

   
8:26 pm on Feb 6, 2002 (gmt 0)

10+ Year Member



Does anyone here feel that they can explain how multi-dimensional arrays work. Preferably two-dimensional.

I've found an article that looks to give an alright explanation but it talks about perl and javascript.
If anyone wants the article just sticky mail me and I'll send you the link.

Thanks

9:16 pm on Feb 6, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



A multi-dimensional array identifies each array element with two (or more) coordinates, instead of using just one. It's like identifying points on a plane (or in a space) instead of points on a line.

Javascript does not actually support multi-dimensional arrays, but you can work around this by having an array whose elements are also arrays. There's a decent explanation on this page [javascriptkit.com].

9:41 pm on Feb 6, 2002 (gmt 0)

10+ Year Member



Its been awhile since I used one, I used to think of them as a spread sheet. Where as you can refference by row and column.
11:26 pm on Feb 6, 2002 (gmt 0)

10+ Year Member



Thanks ya'll :)

I also found this new page [developer.netscape.com].

12:04 am on Feb 7, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Good page circuitjump.

It looks like you've got a good handle on the "lunchboxes" you mentioned on the other thread [webmasterworld.com].