Tell us what’s happening:
I just need help I copy and paste the object of get counts and it is just wrong
}
getCounts() {
return this.items.length;
}
};
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
[...addToCartBtns].forEach(
(btn) => {
btn.addEventListener("click", (event) => {
cart.addItem(Number(event.target.id), products);
})
},
totalNumberofItems.textContent = getCounts ()
);
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Challenge Information:
Learn Basic OOP by Building a Shopping Cart - Step 42