js/catalog.js
// TODO: Add the selected item and quantity to the cart
Add the selected item and quantity to the cart
Add the selected item and quantity to the cart
function addSelectedItemToCart() {
  let list = document.getElementById('items');
  let itemPickedIndex = list.selectedIndex;
  let itemPicked = list.options[itemPickedIndex].text;
  let quantity = document.getElementById("quantity").value;
  cart.addItem(itemPicked,quantity);
}
function addSelectedItemToCart ( ) { let list = document . getElementById ( 'items' ) ; let itemPickedIndex = list . selectedIndex ; let itemPicked = list . options [ itemPickedIndex ] . text ; let quantity = document . getElementById ( "quantity" ) . value ; cart . addItem ( itemPicked , quantity ) ; }
TODO: Add the selected item and quantity to the cart
TODO : Add the selected item and quantity to the cart
// TODO: suss out the item picked from the select list // TODO: get the quantity // TODO: using those, add one item to the Cart