Lesson

Use Lodash Curry to Build Utility Functions

Currying is a very powerful technique to separate functions with multiple arguments into utility functions that can be called one argument at a time. Lodash's curry enables you to write your functions in the traditional "multiple argument" style then create a...

Duration
4 min
Access
Free
Transcript
Available

Currying is a very powerful technique to separate functions with multiple arguments into utility functions that can be called one argument at a time. Lodash's curry enables you to write your functions in the traditional "multiple argument" style then create a "curried" version of the function which can take one argument at a time to build out new functions.

This lesson walks you through creating a curried addEventListener function to build utility functions around button and input events.