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
- Three dots are painted at first
- An empty list clears the old dots
- It paints a sentence
- 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.