How to declare , initialize and use 2 dimensional arrays in javascript, If I write
var arr=new array(2,2)
is it correct to declare a array with 2 rows and two columns
and is it fine if i declare an array variable globally and allocate space in some function. or is the following is correct?
var arr;
//Some operations
function(){
arr[0][1]=8;
};
I dont know how can you mark it as duplicate please read the description of the question not the title i want to declare the array without initializing it are you getting my point if not please ........ you are pointing it to the static declaration of an array and that i know and i learnt from the basics of programming 10 years ago so if you dont know know English kindly go to some language school and come back