Cards (demo)
using a utility javascript file
cards.html
<script src="https://digisoln.com/resources/cards.js"></script> <script> see_deck_in_console(); var card1 = deal_card(); console.log(card1); var card2 = deal_card(); console.log(card2); // Sample: // card1.name: "Two of Clubs" // card1.weight: 2 // card1.url: "https://digisoln.com/resources/cards/2c.gif" // card1.value: "Two" // card1.suit: "Clubs" see_deck_in_console(); console.log(deck[0].url); // Access console in: // Chrome and Edge: ellipsis >> More tools >> Developer tools, find Console // Firefox: waffle >> Web Developer >> Web Console reset(); shuffle(); see_deck_in_console(); </script>