Selections, Drill 5

Write the function setCircleColor to change the fill color of the circles to black.

<body>
  <div>
    <svg id="svg">
        <circle cx="100" cy="50" r="5" fill="red"></circle>
        <circle cx="130" cy="50" r="5" fill="green"></circle>
        <circle cx="160" cy="50" r="5" fill="blue"></circle>
    </svg>
  </div>
  <script>
    d3.selectAll("circle");
    setCircleRadii(d3.selectAll("circle")); // write this function
  </script>
</body>

Try it

Editor
SVG Output
Messages

  
DOM