I don't know what is the reason of this

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

  **Your code so far**

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

    .text((d) => (d + " USD"))
    // Add your code below this line
    .style("color", (d) => {
      if (d < 20) {
        return 'red' ;
      else {
        return 'green' ;

    // Add your code above this line
  **Your browser information:**

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

Challenge: Change Styles Based on Data

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

1 Like

I did exactly what it said to me. But it shows all of my steps are wrong. Please help me with that.

why it’s not working after getting the exact same results that required ?

I just copy pasted your code and it works fine and passes all the tests. Try resetting the code, disabling adblockers etc.