Beginner
Size a circle by area
Write radiusFor(value, max, maxRadius) so that the circle's area is proportional to the value. The biggest value gets maxRadius.
Return 0 for a zero, negative, missing or NaN value instead of letting NaN reach the SVG.
What Check tests
- The biggest value gets the biggest radius
- A quarter of the value gives half the radius
- Zero, negative and missing values give 0
- The drawn circle for 439 rides has radius about 9.5
- 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.