stack overflow when creating a 2d array

I'm getting a stack overflow in the following code. I tried setting the navArray size to 6 in the declaration but that didn't help. Any ideas?<br />
<br />
var pages = new Array("h", "n", "w", "r", "m", "c");<br />
var navArray = new Array();<br />
<br />
pageCount = pages.length;<br />
for (i=0; i<pageCount; i++) {<br />
page = pages;<br />
navArray[page] = new Array();<br />
}<!--content-->could be that:<br />
<br />
navArray[page] maybe you should use i instead of page<br />
navArray = <br />
<br />
just a thought.<!--content-->i stared at this for over an hour before I posted the question. Two minutes after I posted, I figured it out. Typical. It had nothing to do with the 2d array. There was a bit of code elsewhere that was being affected by a naming conflict.<!--content-->Indeed a typical case of coding, figured after posting :)<!--content-->
 
Back
Top