Command Palette

Search for a command to run...

Hectal
Phase 11: Canvas 2D in Depth
Data Visualization · Exercise 4 of 4 Previous
Advanced

Say so when there are no trips

draw(trips) paints a dot per trip. When it is called again with an empty list, the old dots stay and nothing says why.

Make draw([]) clear the canvas, paint the sentence No trips to show., and set the canvas aria-label to the same sentence.

What Check tests

  1. Three dots are painted at first
  2. An empty list clears the old dots
  3. It paints a sentence
  4. The label says the same

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.