const ageSum = ages.reduce(function(total, age) {
   return total + age;
 }, 0);