Bookmark and Share  JavaScript Card Objects  This article shows
how user-defined JavaScript objects can be implemented and used
in a web page. Part of the example here also makes use of CSS
and DHTML but the main focus is on creating and using objects in
JavaScript.   The assumption is that our objects will be used to
implement some card games in JavaScript. To provide basic
functionality we'll define two objects, Card and Stack.  The
Card object will be used to represent individual playing cards
while the Stack object will represent a set of cards, which
individual cards can be added to or removed from. The Stack
object will be designed so it can act as a full deck of cards or
as smaller sets of cards like individual player hands or a
discard pile.  Ranks and Suits  A standard pack of cards
contains thirteen cards of different ranks (ace, 2, 3, ... 10,
jack, queen and king) in each of four suits (clubs, diamonds,
hearts and spades).  To represent these values, a one or two
character string will be used. For