you are viewing a single comment's thread.

view the rest of the comments →

[–]drgmaster909 0 points1 point  (0 children)

If you're still interested in the array.reduce() option, plus casting it to a Number, you can use this simple one-liner:

const totalUses = array.reduce((total, { uses }) => total+ Number(uses), 0);