Tell us what’s happening:
Hey everyone! Hope you’re well
I’ve checked the forums and seen a few ways to get passed this challenge, but they all look rather hacky. Can anyone please tell me how I could concatenate the " USD" onto my h2 tags with a simple and elegant solution?
Thanks in advance!
Your code so far
<body>
<script>
const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];
d3.select("body").selectAll("h2")
.data(dataset)
.enter()
.append("h2")
// Add your code below this line
.text((d) => d).concat();
// Add your code above this line
</script>
</body>
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/data-visualization/data-visualization-with-d3/work-with-dynamic-data-in-d3