As a user, I want to be able to remove items from my cart that I do not want to purchase
AC
WHEN the "REMOVE" button is clicked
THEN the item is removed from the cart
AND the cart displays the rest of the items
DEV NOTES
edit the existingprintCart function in ticket #14 to make the printToDom print the cards inside the cart differently - changing the BUY button to REMOVE and assigns a different unique id and to that Remove button, and also call a function that loops through the items in the cart, and assigns an event listener to each Remove button
when the "REMOVE" button is clicked, the eventListener should call a function removeItem that slices thecart array to remove that item from the card and re-printToDom
USER STORY
As a user, I want to be able to remove items from my cart that I do not want to purchase
AC
WHEN the "REMOVE" button is clicked THEN the item is removed from the cart AND the cart displays the rest of the items
DEV NOTES
printCart
function in ticket #14 to make the printToDom print the cards inside the cart differently - changing theBUY
button toREMOVE
and assigns a different uniqueid
and to that Remove button, and also call a function that loops through the items in the cart, and assigns an event listener to each Remove buttonremoveItem
that slices thecart
array to remove that item from the card and re-printToDom