Welcome to WebmasterWorld Guest from 23.20.110.176

Forum Moderators: open

Message Too Old, No Replies

Multi-dimensional Arrays

In JavaScript

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

Preferred Member

10+ Year Member

joined:May 3, 2001
posts:365
votes: 0


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)

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


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)

Preferred Member

10+ Year Member

joined:Oct 26, 2000
posts:414
votes: 0


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)

Preferred Member

10+ Year Member

joined:May 3, 2001
posts:365
votes: 0


Thanks ya'll :)

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

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

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


Good page circuitjump.

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