为什么用for就报错了,for in 就问题呢?代码如下
var arr = ["*","##","***","&&","****","##*"]; arr[7] = "**"; for(var i =0;i<arr.length;i++){ if(arr[i][0]=="*"){ console.log(arr[i]); } }
var arr = ["*","##","***","&&","****","##*"]; arr[7] = "**"; for(var i =0;i<arr.length;i++){ if(arr[i][0]=="*"){ console.log(arr[i]); } }
2017-12-11
举报