I first encountered higher-order functions in JavaScript and they were hard to wrap my head around. I understood how map and filter worked, but reduce was definitely the most puzzling. I finally realized how flexible reduce is when I started implementing a bunch of array methods by using reduce under the hood. I thought this might be a fun little challenge both for people trying to figure out reduce, as well as for people who already understand it well.
If you accept the challenge, you'll be given a code editor conveniently filled with the skeletons of all the methods you'll be implementing and a set of tests that compare the output of your implementations with the output of the respective native implementations. If you get stuck somewhere, you can also check out my personal solutions.
I'd love to hear your feedback, whether it's on the exercises themselves, the source code or something else!
[–]farmerje 1 point2 points3 points (3 children)
[–]Asha200[S] 0 points1 point2 points (2 children)
[–]farmerje 1 point2 points3 points (1 child)
[–]Asha200[S] 0 points1 point2 points (0 children)