2

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
priomsrb
  • 2,602
  • 3
  • 26
  • 34

1 Answers1

3

Probably not possible.
But you can always embed javascript:

`a = [, 1]`
mutil
  • 3,205
  • 1
  • 27
  • 34