21: Update and Output

21: Update and Output

// update cards dealt
CardsDealt.push(card_drawn + ' of ' + suit_chosen + ' (' + card_value + ')');
// output cards drawn
list_items = '';
for(var card of CardsDealt){
 list_items+='<li>' + card + '</li>';
}
document.getElementById('cardsDrawn').innerHTML = '<ul>'+list_items+'</ul>';
Comments are closed.