Learn Basic OOP by Building a Shopping Cart - Step 8

Step 8

Now that you have your list of products, you can use JavaScript to insert them into the HTML. With this approach, if you decide to add more products, the HTML will automatically reflect that.

Start by calling the .forEach method of your products array. Use arrow syntax to create an empty callback function.
help me with this please:
my code:
products.forEach(callback ())

you are calling a function called callback, which is a non existing function, and it’s not an empty arrow function. How do you write an arrow function?

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