Home | Mailing List | Blog | Tutorial Videos

Reduce Math

Math time! What gets logged?

const arr = [
  x => x * 1,
  x => x * 2,
  x => x * 3,
  x => x * 4
];

console.log(arr.reduce((agg, el) => agg + el(agg), 1));

Select one: