这是我的想法
var date = new Date();
var year = date.getFullYear();
var mon = date.getMonth()+1;
var data = date.getDate();
var day = date.getDay();
var scoreStr = "小明:87;小小花:81;红:97;小低调天:76;小张:74;小小:94;小西:90;小伍:76;小迪:64;小曼:76";
var myarr = scoreStr.split(";");
var num,myarr2,myarr3;
var sum = 0;
for(var i = 0;i<myarr.length;i++){
myarr2 = (myarr[i].split(":"));
console.log(myarr2);
myarr3 = myarr2.slice(-1);
sum += parseInt(myarr3[0]);
}
num = Math.round(sum/myarr.length)
console.log(year+'年'+mon+'月'+data+'日'+' '+'星期'+day+' '+'全班评价分是:'+num);
console.log(num);