function updateCartPreview() {


  // TODO: Get the item and quantity from the form
  // TODO: Add a new element to the cartContents div with that information

  let divCartContents = document.getElementById('cartContents');
  let Div = document.createElement('div');
  divCartContents.appendChild(Div);
  Div.textContent = `Product  : ${cart.items[cart.items.length - 1].product}   ,  Quantity:  ${cart.items[cart.items.length - 1].quantity}`;

}
// TODO: As you add items into the cart, show them (item & quantity) in the cart preview div
As you add items into the cart, show them (item & quantity) in the cart preview div
As you add items into the cart show them ( item & quantity ) in the cart preview div
function updateCartPreview() {
  let divCartContents = document.getElementById('cartContents');
  let Div = document.createElement('div');
  divCartContents.appendChild(Div);
  Div.textContent = `Product  : ${cart.items[cart.items.length - 1].product}   ,  Quantity:  ${cart.items[cart.items.length - 1].quantity}`;
}
function updateCartPreview ( ) { let divCartContents = document . getElementById ( 'cartContents' ) ; let Div = document . createElement ( 'div' ) ; divCartContents . appendChild ( Div ) ; Div . textContent = ` ${ cart . items [ cart . items . length - 1 ] . product } ${ cart . items [ cart . items . length - 1 ] . quantity } ` ; }
TODO: As you add items into the cart, show them (item & quantity) in the cart preview div
TODO : As you add items into the cart show them ( item & quantity ) in the cart preview div
// TODO: Get the item and quantity from the form // TODO: Add a new element to the cartContents div with that information