Created
May 17, 2013 15:53
-
-
Save teejayvanslyke/5600011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!