Fancy forEach with functional programming in JavaScript

Chris Coyier Chris Coyier on

I enjoyed this blog post from Blake Watson about a simple requirement and then going down the rabbit hole of functional programming to solve it in increasingly reusable, if mind-bending ways. By the end:

Creating a function that returns a function that returns a function can get a little trippy to think about. But what we’ve done is make our work reusable and flexible.

Blake admits he didn’t actually use the fully functional abstracted functional version. I vibe with that. Take it as far as you can without sacrificing clarity.

It's time to take your JavaScript to the next level

Leave a Reply

Your email address will not be published. Required fields are marked *

$966,000

Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.