Data Visualization with D3 - Select a Group of Elements with D3

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<body>
  <ul>
    <li>Example</li>
    <li>Example</li>
    <li>Example</li>
  </ul>
  <script>
    // Add your code below this line
  d3.select("li")
    .selectAll("ul")
    .text("list item");


    // Add your code above this line
  </script>
</body>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Challenge: Data Visualization with D3 - Select a Group of Elements with D3

Link to the challenge:

Hey @jamal_aissaoui, take a closer look at your chain of events because you are super close to the solution!

You want to select the ul element, then select all the list item elements li and finally change all of this li elements text to list item.

One little switch, and you’re passing this challenge!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.