javascript进阶篇4-10的问题,为什么出不了结果
<!DOCTYPE HTML> <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script type="text/javascript"> var infos=[['A','女','21','大一'],['B','男','23','大三'],['C','男','24','大四'],['D','女','21','大一']]; for(var i=0;i<=infos.length;i++) {switch(infos[i][3]) {case 'dayi': if (infos[i][1]=='nv') document.write(infos[i][0]); break; default: document.write("请继续查找!"); break;} } </script> </head> <body> </body> </html>