<script type="text/javascript">
//创建数组
//显示数组长度
var arr = ['*','##',"***","&&","****","##*"];
arr[7] = "**";
//将数组内容输出,完成达到的效果。
document.write(arr.length+"<br>");
for (var i = 0; i < arr.length; i++) {
if (i % 2 == 0) {
if(arr[i]==null){
document.write(arr[i+1] + "<br/>");
}else{
document.write(arr[i] + "<br/>");
}
}
}
</script