I would like to know how to declare 2 dimensional arrays in java script of fixed lengths something like,
var array = new Array[this.rows, this.columns];
after that I would like to get the length of each dimension like,
array[0].length; // I am assuming this would give me the first dimension like in C# array.GetLength(0);
array[1].length; // I am assuming this would give me the second dimension like in C# array.GetLength(1);
A quick example of what @SLaks is referring to with jagged arrays. You basically put an array in an array. The below example shows one way to make an array thats 100×100.
Live Demo
This method is very flexible for instance
arr[4]could have an array indexed to 10, andarr[5]could have an array with 1 value, or be even be a completely different type such as a string or number.