CoffeeScript 2 Dimensional Array Usage
- by Chris
I feel like I'm missing something with CoffeeScript and 2 dimensional arrays. I'm simply attempting to make a grid of spaces (think checkers). After some searching and a discovery with the arrays.map function, I came up with this:
@spaces = [0...20].map (x)->
[0...20].map (y) ->
new Elements.Space()
And this seems to work great, I…