I just noticed too, when i was trying to implement a 2D array into JS. It is Screwed. But here is a solution if you want to stick to multidimensional arrays: An Object.
function Array2D() {
function setArray(length) { // set an array inside the object
this.elem=new Array();
for(i=0;i<length;i++) {
this.elem[i]=null;
}
}
this.setArray=setArray;
this.elem=null; // our array
}
With this little fella you can hide your intentions from the Evil Javascript Developers, and secretly make a 2D array:
arr = new Array();
arr[0] = new Array2D();
arr[0].setArray(2);
arr[0].elem[0] = "Hy, ";
arr[0].elem[*] = "I'm ";
arr[*] = new Array2D();
arr[*].setArray(2);
arr[*].elem[0] = "Da";
arr[*].elem[*] = "vid!";
alert(arr[0].elem[0] + arr[0].elem[*] + arr[*].elem[0] + arr[*].elem[*]); // this will say "Hy, I'm David!"
*******************