Learn Basic OOP by Building a Shopping Cart - Step 12

Tell us what’s happening:

i tried to escape the dollar sign with a backslash, still can’t pass…
and the error is: Your first p element should have the text of the price variable with a dollar sign in front of it.

Your code so far

products.forEach(
  ({ name, id, price, category }) => {
    dessertCards.innerHTML += `
      <div class="dessert-card">
        <h2>${name}</h2>
          //editable code:
        <p class="dessert-price">${price}$</p>
        <p class="product-category">Category: ${category}</p>
          //editable 
      </div>
    `;
  }
);```


WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

```text
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0 (Edition std-2)

Challenge Information:

Learn Basic OOP by Building a Shopping Cart - Step 12

“in front of it” means it has to come before the dollar value, like $10

i though the dollar sign should be "in front of it ".

if you write $10 the dollar sign is in front of the number, it’s what you need to do

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.