Created
February 21, 2012 23:37
-
-
Save sleepyfox/1879845 to your computer and use it in GitHub Desktop.
Nested array comprehension in CoffeeScript
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
cards = ["2", "3", "4"] # etc... | |
suits = ["hearts", "spades"] # etc... | |
array = (a+b for a in cards for b in suits) | |
alert array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment