Learn Basic OOP by Building a Shopping Cart - Step 34

Tell us what’s happening:

someone tell me the problem in this i have added forEach method in buttons array

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

const buttons = [...addToCartBtns];
buttons.forEach();

// User Editable Region

Your browser information:

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

Challenge Information:

Learn Basic OOP by Building a Shopping Cart - Step 34

you should not create a new variable, you should use the spread operator and forEach in the same expression

2 Likes

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