Data Visualization · Exercise 4 of 4 Previous
Advanced
Draw the line on
Write reveal(path, ms) that draws a path on from left to right with the dash trick, and removes the dash attributes at the end.
For a path with no length (empty d, or one point) it must do nothing and not throw. Call it for the line already on the page.
What Check tests
- Early in the reveal the line is hidden by a dash
- At the end the dash attributes are gone
- An empty path does nothing and does not throw
- 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.