FrontendInterviews.dev

Loading problem…

47. Progress Bar II - Sequential Queue

Medium•
Acceptance: 64.00%
•
🔓3/3 Pro unlocks today

This problem builds on progress-bar. Complete that first, then load your solution to continue.

Build on Progress Bar I.

Clicking Add appends bars, but now bars must fill one at a time:

  • only one active bar at any time,
  • next bar starts only after previous finishes,
  • each bar still takes around 2000ms.

Constraints

  • Use queue-like behavior
  • Only one bar animates at once
  • New bars can be added while a bar is already animating
  • Each bar should eventually complete