So I'm trying to get a multidimensional array to work in CoffeeScript. I have tried with standard Python list comprehension notation, that makes the inner bracket a string or something. so I can't do list[0][1] to get 1, I instead get list[0][0] = '1,1' and list[0][1] = ''
[[i, 1] for i in [1]]
Using a class as the storage container, to then grab x and y. Which gives 'undefined undefined', rather then '1 1' for the latter part.
class Position
constructor:(@x,@y) ->
x = [new Position(i,1) for i in [1]]
for i in x
alert i.x + ' ' + i.y#'undefined undefined'
i = new Position(1,1)
alert i.x + ' ' + i.y#'1 1'
Being able to use a list of points is extremely needed and I cannot find a way to make a list of them. I would prefer to use a simple multidimensional array, but I don't know how.