1×
Become a member
to unlock all features
Autoplay

    Build Up Complex Functionality by Composing Simple Functions in JavaScript

    javascriptJavaScript

    This lesson teaches you the concept of composition, the building up of complex functionality through the combining of simpler functions. In a sense, composition is the nesting of functions, passing the result of one in as the input into the next. But rather than create an indecipherable amount of nesting, we'll create a higher order function, compose(), that takes all of the functions we want to combine, and returns us a new function to use in our app.