Repository: https://github.com/TomDoesTech/js-des...
A Higher Order Function (HOC) is a function that takes are least one or more functions as arguments or a function that returns a function as its result.
How is this possible
In JavaScript, functions are first-class citizens
Functions can be passed around as values, even to other functions
Composition - Take lots of functions and compose them together to build features
Why use higher order functions?
Makes code more reusable
Can make your code more readable by abstracting details away
You've used higher order functions before
Array.map
Array.filter
Array.reduce
🌎 Follow me here:
Discord: / discord
Twitter: / tomdoes_tech
Facebook: / tomdoestech
Instagram: / tomdoestech
TikTok: / tomdoes_tech
☕ Buy me a coffee: https://www.buymeacoffee.com/tomn