Skip to main content

Practice ยท 1 of 3

Pipeline Runner

CHALLENGE
Difficulty: intermediate+25 XP

Write runPipeline(middlewares, handler) โ€” middlewares is an array of functions (req, next); handler is (req). Each middleware may mutate req then must call next(). Return the final req after the full chain ran. If a middleware never calls next, the chain stops (and you still return the req as-is).

Back to lesson: Practice: Middleware Pipeline โ€” Practice