let unReadCount = resultList.reduce((pre, cur) => {
return pre + cur.unReadCount
}, 0)
js reduce求和
于 2023-09-05 14:14:36 首次发布
let unReadCount = resultList.reduce((pre, cur) => {
return pre + cur.unReadCount
}, 0)