Data Visualization · Exercise 1 of 5Next
Beginner
Bars from an array
values holds five numbers. Draw one <rect> per value in the SVG: x = i * 50, width 40, height = d * 15, standing on the line y = 150.
The starter draws a single bar by hand. Replace it with a join.
What Check tests
- There are 5 bars
- The tallest bar is 135 high and holds the value 9
- Every bar stands on y = 150
- 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.