Learn Recursion by Building a Decimal to Binary Converter - Step 97

Tell us what’s happening:

I have no idea what is wrong with my code :woman_shrugging:
Instructions state the following:
Finally, use string interpolation to set the text of the paragraph element to decimalToBinary(${currVal}) , where currVal is the inputVal property of the current object. After this, test out your code by entering the number 5 into the number input and clicking the Convert button.

And the error I get is :
You should use string interpolation to set the text of the paragraph element to decimalToBinary(${obj.inputVal}) .

Your code so far

animationData.forEach((obj) => {
    setTimeout(() => {
      animationContainer.innerHTML += `
        <p id="${obj.inputVal}" style="margin-top: ${obj.marginTop}px;" class="animation-frame">
${decimalToBinary(${obj.inputVal})}
        </p>
      `;
    }, obj.addElDelay);
  });
};

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Challenge Information:

Learn Recursion by Building a Decimal to Binary Converter - Step 97

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Hi @nefucini

This is the code the error message is giving you.

Here is your code.

The function does not need template literal syntax.
Then check you parenthesises.

Happy coding

I had tried that before, but it didn’t work. Now it did. Thanks! should I delete this thread?

1 Like

Yes, you can delete it.

I can’t. I need a moderator to do. I’ll flag it so they can read this and delete it. Thanks again!

Edit: can’t flag my own post. Can you do it please?

You don’t need to delete a thread once you solved the problem

1 Like