继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

代码一般,水货到此一游

哥要奋斗
关注TA
已关注
手记 1
粉丝 1
获赞 1

function Stu(name,sex,age,grade){
var stu = new Object()
stu.name=name;
stu.sex =sex;
stu.age = age;
stu.grade = grade;
return stu;
}
var stus = [];
stus[0] = Stu("小A","女",21,"大一");
stus[stus.length] = Stu("小B","男",23,"大三");
stus[stus.length] = Stu("小C","男",24,"大四");
stus[stus.length] = Stu("小D","女",21,"大一");
stus[stus.length] = Stu("小E","女",22,"大四");
stus[stus.length] = Stu("小F","男",21,"大一");
stus[stus.length] = Stu("小G","女",22,"大二");
stus[stus.length] = Stu("小H","女",20,"大三");
stus[stus.length] = Stu("小I","女",20,"大一");
stus[stus.length] = Stu("小J","男",20,"大三");
for(var i=0;i<stus.length;i++){
if(stus[i].sex=="女" && stus[i].grade =="大一"){
document.write(stus[i].name+"<br/>");
}
}

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP