📜  typescript 对所有数组值求和 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:14.636000             🧑  作者: Mango

代码示例1
const sum = receiptItems.reduce((sum, current) => sum + current.total, 0);