一维数组:
对于一维数组的声明有以下几种:
1.var fruit=new Array();
2.var fruit =new Array(3);
3.var fruit = new Arrat(‘3‘, ‘4‘);
二维数组的声明:
1.var array=new Array(new Arrat(‘3‘, ‘4‘),new Arrat(‘a‘, ‘c‘));
2.var array = new Array[[1,2,4,6],[2,4,7,8],[8,9,10,11],[9,12,13,15]] ;
3.var fruit =new Array(3);
for(int i=0;i<3;i++){
fruit[i]=new Array(3);
}
原文:https://www.cnblogs.com/baokeai/p/10163846.html