Learn Basic OOP by Building a Shopping Cart - Step 18

Tell us what’s happening:

I have tried everything, even went to the next step to check what I’m missing. Even when copying from the next step, still won’t pass. Any help?

Your code so far

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

/* file: styles.css */

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

  addItem(id, products) {
    const product = products.find(item =>id===item.id);
  }

// 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/139.0.0.0 Safari/537.36

Challenge Information:

Learn Basic OOP by Building a Shopping Cart - Step 18

Try resetting the lesson or refreshing your browser. Good luck

1 Like

Traditionally when using an arrow expression, the parameter is supposed to go first in any comparisons.