re: Explain REDUCE Like I'm Five VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I use it when I want to do something on an array and get a single value in return. const totalCost = foodItems.reduce((total,item) => total + ...
 

I'm always doing these things from my phone 😶

 

It's not great, but it goes a lot more smoothly when you turn off autocorrect. All of the operating systems have native swipe-to-type now, too, which obviates most of the unpleasantness. At least, when you're not on one of those gargantuan "Plus" phones >.>

code of conduct - report abuse