assets/js/cart.js
// TODO: Remove all of the rows (tr) in the cart table (tbody)
Remove all of the rows (tr) in the cart table (tbody)
Remove all of the rows ( tr ) in the cart table ( tbody )
function clearCart() {
  var tableRows = document.querySelectorAll('#cart tbody tr');
  for (var i = 0; i <= tableRows.length; i++) {
    if (tableRows[i]) {
      tableRows[i].remove();
    }
  }
}
function clearCart ( ) { var tableRows = document . querySelectorAll ( '#cart tbody tr' ) ; for ( var i = 0 ; i <= tableRows . length ; i ++ ) { if ( tableRows [ i ] ) { tableRows [ i ] . remove ( ) ; } } }
TODO: Remove all of the rows (tr) in the cart table (tbody)
TODO : Remove all of the rows ( tr ) in the cart table ( tbody )