关于二维数组的条件筛选输出
忽略掉全都是一样的信息这个“bug”,嫌麻烦所以复制的,题目是:输出所有是大一的女生,请问这代码哪写错了,为啥一个都输出不了呢,请指正
var infos[["小a","女",21,"大一"],["小b","女",21,"大一"],["小c","女",21,"大一"],["小d","女",21,"大一"],["小e","女",21,"大一"],["小f","女",21,"大一"],["小g","女",21,"大一"],["小h","女",21,"大一"],["小i","女",21,"大一"],["小j","女",21,"大一"]];
for(var i=0;i<infos.length;i++){
var jr=infos[i][3];
var wx=infos[i][1];
if(wx=="女" && jr=="大一"){
document.write(infos[i]+"<br/>");
}
}