Tell us what’s happening:
You should assign the value returned by the getElementsByClassName() method to the addToCartBtns variable.
please tell me what did i miss? the console keep coming as above
Your code so far
const addToCartBtns = document.getElementsByClassName(“add-to-cart-btn”);
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
const addToCartBtns = document.getElementsByClassName("add-to-cart-btn");
// 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/132.0.0.0 Safari/537.36
Challenge Information:
Learn Basic OOP by Building a Shopping Cart - Step 33