Stuck on D3 exercise: Add Classes with D3

In the following D3 exercise called Add Classes with D3 https://learn.freecodecamp.org/data-visualization/data-visualization-with-d3/add-classes-with-d3 I can’t get my code to pass. I type in .attr(“div”,“bar”) and I can’t pass the first test (the second test passes fine). Is this an error in the project or am I missing something?

Edit: Never mind, I solved this issue. The solution was to make it .attr(“class”,“bar”).

Hi,
I am a little beginner, but from what I understand the attr method is an assignment, there is no statement that we have to pass attr (“div”, “class”) if we take only the example they give selection.attr("class", "container")
The impression that we have to replace the first parameter with a class and second with a container which confuses, without reading the explanation better, my first language is Portuguese so I missed some details.
Going back, having done all the selection on top of the div (which is a tag called container) the assignment for each div is given by attr('class', 'bar') why is basically done even though <div class = "bar">, pass an identify class by assigning the class .bar.