1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

    Modify Functions with Higher Order Functions in JavaScript

    javascriptJavaScript

    This lesson teaches the concept of higher order functions (HOF) in JavaScript, a necessary building block of functional programming in any language.

    A higher order function does at least one of the following things, often both:

    1. Accepts a function as an argument
    2. Returns a new function

    To demonstrate this, we will build a higher order function, withCount(), that modifies any function passed to it so that it logs out how many times it has been called.