Level 1M4Lesson 4.5

beginner35 minby DevFox

reduce

Fold a whole list into one value with reduce: a rule that takes the total so far and the next item, and a start value it begins from. Add up the minutes of a day, add up something about every item, see why each answer comes back as the next total, and why leaving out the start value glues numbers onto text or stops Node on an empty list.

  • Fundamentals
  • TypeScript
`reduce`. Read this lesson at .