This page demonstrates some of the Stack
object's features.
Three stacks are defined, a deck, a seven card hand and a discard pile. You
can use the links below to shuffle the deck, deal a hand, discard the hand or
return all used cards to the deck.
Shuffle Deck | Deal | Discard | Reset Deck
Use your browser's View Source
option to see the full source
code.