Results 1 to 6 of 6

Thread: multidimensional arrays in javascript (resolved)

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638

    multidimensional arrays in javascript (resolved)

    i know that to create multidimensional arrays in javascript you have to create an array of arrays, seeing as it doesn't support them properly. so, if i wanted to create a 4x500 array like this:

    Code:
    Col0    Col1    Col2    Col3
    Row0    Row0    Row0    Row0
    Row1    Row1    Row1    Row1
    Row2    Row2    Row2    Row2
    ....    ....    ....    ....
    Row499  Row499  Row499  Row499
    would i have to do this:

    Code:
    var arrStuff = new Array(new Array(3), new Array(3), new Array(3), new Array(3)...500 times)
    if so, bugger that!
    Last edited by tr0n; Jul 31st, 2002 at 08:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width