Help Please Data Visualization with D3

Tell us what’s happening:
I am not getting that wt i missed here


<body>
<script>
  const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];

  const w = 500;
  const h = 100;

  const svg = d3.select("body")
                .append("svg")
                .attr("width", w)
                .attr("height", h);

  svg.selectAll("rect")
     .data(dataset)
     .enter()
     .append("rect")
     .attr("x", (d, i) => i * 30)
       // Add your code below this line
     .attr("y", (d, i) => h - 3 * d)


       // Add your code above this line
     })
     .attr("width", 25)
     .attr("height", (d, i) => 3 * d);
</script>
</body>

Your browser information:

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

Challenge: Invert SVG Elements

Link to the challenge:

pls post your code so that we know the problem…

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

There are two problems with the grouping symbols. One, there is an opening brace (’{’) missing after your arrow. Two, the right parenthesis after h - 3 * d closes the call to .attr(), leaving the }) unmatched.

When I paste your code into the challenge, the console reads

SyntaxError: unknown: Unexpected token (22:5)

  20 | 
  21 |        // Add your code above this line
> 22 |      })
     |      ^
  23 |      .attr("width", 25)
  24 |      .attr("height", (d, i) => 3 * d);
  25 | 

This means you’ve got a syntax error. When it points at a brace, bracket, or parenthesis, it almost always means you haven’t matched them.

The good news is that your code is correct once the grouping symbols match.