Challenge 1 of 4
Apply twice
Instructions
Write `applyTwice(fn, value)` that calls `fn` two times on `value`.
Editor
IntelliSense on
// Write your code below
Module 2 of 4
Callbacks, closures, and reusable function factories.
Intermediate JavaScript · 0/4 completed · scroll down for every challenge
Challenge 1 of 4
Write `applyTwice(fn, value)` that calls `fn` two times on `value`.
Editor
IntelliSense on
// Write your code below
Challenge 2 of 4 · Make multiplier
Challenge 2 of 4
Write `makeMultiplier(x)` returning a function that multiplies by `x`.
Editor
IntelliSense on
// Write your code below
Challenge 3 of 4 · Count with closure
Challenge 3 of 4
Write `makeCounter()` that returns a function incrementing a private count from 0.
Editor
IntelliSense on
// Write your code below
Challenge 4 of 4 · Compose two
Challenge 4 of 4
Write `compose(f, g)` that returns a function `x => f(g(x))`.
Editor
IntelliSense on
// Write your code below
Next module