Re: 3d array in javascript
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: 3d array in javascript

From: Hal Rosser <hmrosser@bellsouth.net>
Date: Tue Apr 18 2006 - 07:22:16 CEST

"Hal Rosser" <hmrosser@bellsouth.net> wrote in message
news:Nz_0g.31359$Jk3.24934@bignews5.bellsouth.net...
>
> "hardik" <hardikdangar@gmail.com> wrote in message
> news:1145334875.031622.167800@i39g2000cwa.googlegroups.com...
> > how i can set 3*3 array in javascript i have tried this but didnt work
> >
> > <Script>
> > var a[2][2][2]=new array()
> > <\Script>
> >
> >
> > but it didnt work.
> >
>
> var a = new Array();
> a[0]= new Array();
> a[0][5] = new Array;
> a[0][5][72]="<h3>Hello matey</h3>";
> document.writeln(a[0][5][72]);

You could loop through each array and declare new arrays for each element,
also
This is kinda clumsy - so I'm sure others will post a better solution.-
where I will take notes.
But the point is: its really an array of arrays [of arrays].... rather than
a single multidimensional array.

>
>
Received on Mon May 1 05:05:27 2006