Skip to content

Instantly share code, notes, and snippets.

@teejayvanslyke
Created May 17, 2013 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teejayvanslyke/5600011 to your computer and use it in GitHub Desktop.
Save teejayvanslyke/5600011 to your computer and use it in GitHub Desktop.
var suits = ["Hearts", "Spades", "Clubs", "Diamonds"];
var faces = ["Ace", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"];
var cards = []
for (var s=0; s<suits.length; s++) {
for (var f=0; f<faces.length; f++) {
cards.push({suit: suits[s], face: faces[f]});
}
}
@ZacharyDinerstein
Copy link

I took a look at this code again and realized that I actually (mostly) understand it. Don't think I could reproduce it w/o a reference quite yet, but I can totally follow it. Can't tell you how buzzed that makes me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment