# Array Question (Double Array)

**URL:** <https://forum.kirupa.com/t/array-question-double-array/290339>\
**Category:** flash\
**Created:** [June 12, 2009, 9:09pm UTC](https://forum.kirupa.com/t/array-question-double-array/290339 "2009-06-12T21:09:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariel\_mirahy](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@ariel\_mirahy](https://forum.kirupa.com/u/ariel_mirahy)\
**Post date:** [June 12, 2009, 9:09pm UTC](https://forum.kirupa.com/t/array-question-double-array/290339/1 "2009-06-12T21:09:26Z")

</div>

Hello Everybody,

I defined an array like this newArray = []; and seems to work preety well, but I need this array to be a double array, but it doesn’t let me define it this way newArray = [][];

can you help me out with my code?, my array is called “teamID”

[AS]  
NFL = this.firstChild;  
weekNumber = NFL.attributes.week;  
matchupNumber = [];  
teamID = ([], []); //This one is my problem!!!  
total = NFL.childNodes.length;

```
    for (i=0; i&lt;total; i++) {

        matchupNumber* = NFL.childNodes*;

        for (j=0; j&lt;2; j++) {

            teamID*[j] = matchupNumber*.childNodes[j]; //How should I define it to make THIS work?
       }

```

[/AS]

Although, if I work it “SINGLE” array it works fine, but I really need it to be a “DOUBLE” array, the SINGLE array looks like:

[AS]  
NFL = this.firstChild;  
weekNumber = NFL.attributes.week;  
matchupNumber = [];  
teamID = []; //This way is a SINGLE array  
total = NFL.childNodes.length;

```
    for (i=0; i&lt;total; i++) {

        matchupNumber* = NFL.childNodes*;

        for (j=0; j&lt;2; j++) {

            teamID[j] = matchupNumber*.childNodes[j]; //This way it works, but its single
       }

```

[/AS]
