数组声明的两种方式:
var arr01 = ["二哈","松狮","沙皮","柯基"];
var arr02 = new Array("老虎","狮子","狗子");
遍历:
var arr01 = ["二哈","松狮","沙皮","柯基"];
var arr02 = new Array("老虎","狮子","狗子");
for (var i = 0;i <= arr01.length; i++){
console.log(arr01[i]);
}
for (var i = 0;i <= arr02.length; i++){
console.log(arr02[i]);
}