Closed jpantana closed 5 years ago
For this case you shouldn't need a counter. Just use the cart.length. You will always want this number to match the number of things in your array exactly. Please rework the development section to account for this change
For inspiration: https://codepen.io/chcculle/pen/qPrWBK
User Story
As a user, when I click "add to cart" button, a cart icon in the top left of nav bar should be incrementally counting with each item
AC
WHEN i click "add to cart" THEN a cart icon in nav bar should have a number that incrementally counts reflecting how many individual items are in my cart
Development
cartIcon();
)const cartIcon = () => { let num = array.length; printToDom('cardIconId', num);};
data-count=""
to the html will be of use (maybe 🤷🏻♂️)