摘要:
今天来学习一下数组的遍历、删除等知识点: 1 数组的遍历 数组元素的遍历可以使用for循环,采用关键字for...in var aCity = new Array("北京","上海","广州"); //声明一个数组 for(var i in aCity){ //遍历数组中的每一项 alert(aCity[i]); } 二维数组的遍历: var aCity = new Array();aCity[0] = new Array(); //二维数组赋值 aCity[0][0] = "常州"; aCity[0][1] = 阅读全文