Reduce example
const iceCreamStats = [
{name: 'Amanda', gallonEaten: 1.0},
{name: 'Marcos', gallonEaten: 2.0},
{name: 'Julia', gallonEaten: 4.0},
{name: 'Bruno', gallonEaten: 3.0}
]
const total = iceCreamStats.reduce((accumulator, currentValue) => {
return accumulator + currentValue.gallonEaten
}, 0);
console.log(total);INFO