Ok. I think you need to look a little deeper into D3 on your own to better understand the library.
I’ll try to explain what this code does:
Here we’re selecting (targeting) all H2 elements inside the body element. Maybe there are 0 or 100, but we will deal this this later.
Next, we’re using the data method D3 the dataset to work with (an array).
With the enter method we’re telling D3 to look for the dataset passed in the previous line and make as many placeholders as needed depending on the number of items in the dataset.
Here we’re appending, or replacing so to say, one H2 tag for each placeholder created previously…
…and then we’re setting the inner text for each H2 element, using an arrow function, using every value in the dataset.
.text( (d) => d + " USD" );
d is the argument for the function and represents each value in the dataset (12, 31, 22, 17…).