item) => item.quantity * item.price
)}
What's the initial value? And you should be using the total param, otherwise you're basically doing a map
Can you provide the array you trynna pass the reducer function on? This block of code is incomplete, you aren't making use of the accumulator here
Or, better, like this, just + total
Обсуждают сегодня