Declare sparse array in coffeescript

43 views Asked by At

In Javascript I can declare a sparse array like:

a = [, 1]

But that gives an error in Coffeescript. So how can I create sparse arrays in Coffeescript?

I want to do it in a single assignment and not like:

a = []
a[1] = 1
1

There are 1 answers

1
mutil On BEST ANSWER

Probably not possible.
But you can always embed javascript:

`a = [, 1]`