[SUPPLEMENT] Functional Programming: How reduce() can mimic map() and filter()

[SUPPLEMENT] Functional Programming: How reduce() can mimic map() and filter()
0.0 0

#1

As I was going through the Javascript Functional Programming section on the Beta a while ago, I noticed that the lesson stated that the array reduce function could be used to implement map and filter functionality. I remembered that as I was doing the React lessons, and my inner completionist wouldn’t let it go. So, I wrote up a little codepen to show it (using a little CSS grid action with responsive design b/c completionist):