const average = euros.reduce((total, amount, index, array) => { total + amount return total/array.length}, 0);A Guide To The Reduce Method In Javascript8.4K41Josh Pitzalissina malekiFollowSep 8, 2018 · 1 min read`total += amount`