Intermediate
Respect reduced motion
showBar(width, reduced) should set the bar's width at once when reduced is true, and slide to it over 300 ms when it is false. Both paths must give the same final width.
Fix it so that showBar(200, true) has set the width before the function returns.
What Check tests
- With reduced = true the width is set at once
- With reduced = false the bar is not there yet, then arrives
- No attribute holds NaN
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.