<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>流程控制语句</title>
<script type="text/javascript">
//第一步把之前的数据写成一个数组的形式,定义变量为 infos
var infos = new array(3);
infos[0] = new array(4);
infos[0][0] = "小A";
infos[0][1] = "女";
infos[0][2] = "21";
infos[0][3] = "大一";
infos[1] = new array(4);
infos[1][0] = "小B";
infos[1][1] = "男";
infos[1][2] = "23";
infos[1][3] = "大三";
infos[2] = new array(4);
infos[2][0] = "小C";
infos[2][1] = "男";
infos[2][2] = "24";
infos[2][3] = "大四";
//第一次筛选,找出都是大一的信息
for( i = 0;i<3;i++)
{
if(infos[i][3] == "大一")
{
for(var j = 0;j<4;j++)
{
document.write(infos[i][j]);
}
}
}
//第二次筛选,找出都是女生的信息
</script>
</head>
<body>
</body>
</html>
new array(4);的array首字母大写
还有就是单双引号的使用有什么区别么