Skip to main content

Practice ยท 1 of 3

Resilient Pipeline

Write async function pipeline(value, steps) where steps is an array of sync-or-async functions. Await each step in order, feeding each result into the next. If a step throws, RETURN { ok: false, error: err.message }; otherwise RETURN { ok: true, value: finalValue }.

Difficulty: intermediate

Back to lesson: Practice: Promises โ€” Practice