数组 1 map 映射 一个对一个 如:分数数组[34,56,78,99]映射为[不及格,不及格,及格,及格]; 等级数组[23,56,89]映射为 [ {name:'lmx',level:1,role:1}, {name:'zhangsan',level:88,role:3}, {name:'lisi',level:33,role:2}, ]; 代码示例一: let score=[34,56,78,99]; let res=score.map(item=>item>=60?'及格':'不及格…