var a=[]; var c=[80,90,70,100] var b={'张三':19,'成绩':c}; a.push(b); console.log("测试案例",a);
同等于:
[{'张三':19,'成绩':[80,90,70,100]}]
效果图: