题解 | #总成绩排名#
总成绩排名
https://www.nowcoder.com/practice/469004467e9a45c8b4f57401b653aef5
const _rank = array => {
const res = array.sort((a, b) => {
return (b.chinese + b.math + b.english) - (a.chinese + a.math + a.english);
})
return res;
}
总成绩排名
https://www.nowcoder.com/practice/469004467e9a45c8b4f57401b653aef5
const _rank = array => {
const res = array.sort((a, b) => {
return (b.chinese + b.math + b.english) - (a.chinese + a.math + a.english);
})
return res;
}
相关推荐