function updateCartPreview() {
  
  var ulForCartContents = document.createElement('ul');
  document.getElementById('cartContents').appendChild(ulForCartContents);

  for (var i in arrayCart){
    var itemInCartLI = document.createElement('li');
    ulForCartContents.appendChild(itemInCartLI);
    ulForCartContents.textContent = arrayCart[i].name;
  }


  // TODO: Get the item and quantity from the form
  // TODO: Add a new element to the cartContents div with that information
}
// 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() {
  var ulForCartContents = document.createElement('ul');
  document.getElementById('cartContents').appendChild(ulForCartContents);
  for (var i in arrayCart){
    var itemInCartLI = document.createElement('li');
    ulForCartContents.appendChild(itemInCartLI);
    ulForCartContents.textContent = arrayCart[i].name;
  }
}
function updateCartPreview ( ) { var ulForCartContents = document . createElement ( 'ul' ) ; document . getElementById ( 'cartContents' ) . appendChild ( ulForCartContents ) ; for ( var i in arrayCart ) { var itemInCartLI = document . createElement ( 'li' ) ; ulForCartContents . appendChild ( itemInCartLI ) ; ulForCartContents . textContent = arrayCart [ i ] . name ; } }
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