Learn Basic OOP by Building a Shopping Cart - Step 34

Tell us what’s happening:

please assist with whats wrong

const btnsArray = [...addToCartBtns];

btnsArray.forEach();

Your code so far

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

/* file: styles.css */

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

const btnsArray = [...addToCartBtns];

btnsArray.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

Hi there. The challenge doesn’t seem to expect you to store everything into a variable. Rather it expects you to call the forEach method on the newly created array directly.

Hope this helps. :slight_smile:

1 Like

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