![]() Preserved Topic: Multi-dimensional arrays and length.  | 
  |
|---|---|
| Author | Thread | 
| 
       Paranoid (IV) Inmate From: Minneapolis, MN, USA  | 
    
       
  posted 06-13-2001 17:51
      
      Couple of questions.  First of all, does javascript handle multiple dimension arrays the same as java?  ie. arrays of arrays.  | 
  
| 
       Lunatic (VI) Mad Scientist From: Massachusetts, USA  | 
    
       
  posted 06-13-2001 18:18
      
      Yup and yup. Array.length works fine, and in fact, you can *set* it in order to truncate an array.  | 
  
| 
       Nervous Wreck (II) Inmate From: Netherworld  | 
    
       
  posted 06-25-2001 20:11
      
      How exactly can I create a  two dimensional array in Javascript? Is it possible at all?  | 
  
| 
       Paranoid (IV) Inmate From: Minneapolis, MN, USA  | 
    
       
  posted 06-25-2001 20:16
      
      I'm not very experienced with javascript syntax, and so I don't know if you even need to declare your arrays (in PHP u can just start filling them without a declaration...) but assuming you need a declaration, you would define a 10 x 10 array like so:  | 
  
| 
       Maniac (V) Mad Scientist From: Belgrade, Serbia  | 
    
       
  posted 06-25-2001 20:40
      
      <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">  | 
  
| 
       Maniac (V) Mad Scientist From: 100101010011 <-- right about here  | 
    
       
  posted 06-25-2001 22:33
      
      You can also simulate this by creating objects ie:  |