I have a question about this code:
getContent: (index) ->
content = @get('content')
element = content.objectAt(index)
if element?
[type, clientId] = element
store = @get('store')
if clientId?
store.findByClientId(type, clientId)
I am specifically talking about this line:
[type, clientId] = element
I do not understand how I can assign two values from one variable.
Would element have to be an array in order for the above to successfully assign values to the left hand side array?
That is syntactic sugar, that means:
Also, you should know, that there is a place where you can see in what coffeescript is compiled: http://coffeescript.org/ (try coffeescript tab)
All your coffeescript code in javascript: