All challenges

JavaScript challenge · Frontend

Compose

Difficulty

easy

Time

~15m

Format

Single

Grading

Auto-graded

#frontend#javascript#typescript#functions
Mission file // read carefullyeasy

Implement compose(...fns) that returns a function applying fns right to left: compose(f, g)(x) === f(g(x)). With no functions it is the identity.

compose(inc, double)(5) // => inc(double(5)) = 11

Build with

TypeScriptJavaScript
Hidden test suite
Auto-graded on submit
Start challenge

Sign in to save your progress.