WebmasterLingo
Windows 2003, cPanel & DirectAdmin Unix Web Hosting

Go Back   WebmasterLingo > Programming Corner
User Name
Password

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old January 11th, 2004, 05:31 PM   #1
airnine
Moderator
 
Join Date: Jan 2004
Posts: 80
airnine is off the scale
Send a message via ICQ to airnine
Unhappy lack of multidimensional arrays in javascript

Hi guys,

A while ago I had to use arrays in javascript. No matter how many dimensional an array is you can always transform it into a one dimensional array, at least I think so. But the problem arises, if you have big indexes involved, for arguments sake. What I would like to know is, how do other people solve the lack of multidimensional arrays in javascript.

Thanks for any tips.

Airnine
__________________
-------------------------------
Airnine is a developer @
www.promomedium.com
-------------------------------
airnine is offline   Reply With Quote
Old January 11th, 2004, 06:37 PM   #2
airnine
Moderator
 
Join Date: Jan 2004
Posts: 80
airnine is off the scale
Send a message via ICQ to airnine
two-dimensional arrays exist

well guys

I have been plain wrong and Matt the administrator of this site kindly gave me a lesson on multidimensional arrays in javascript

the problem is I thought of declaring an array like

somearray = new Array[i,j]

but that was giving two elements, element i and element j to this onedimensional array called somearray, but if I wanted two-dimensional array I should have put it like

somearray = new Array[[i],[j]]

and this would have given me a two dimensional array with dimensions i and j

Matt, thanks once again

Airnine
__________________
-------------------------------
Airnine is a developer @
www.promomedium.com
-------------------------------
airnine is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 01:30 PM.

Windows 2003, cPanel & DirectAdmin Unix Web Hosting