This works:
myfunc = () ->
id: 3
name: 'myname'
But I want to be explicit about returning object.
myfunc = () ->
return
id: 3
name: 'myname'
But I get "Unexpected 'INDENT'" error. What's wrong with the above code?
myFunc = ->
return {
id : 3
name : 'myname'
}
myFunc = ->
return {} =
id : 3
name : 'myname'
myFunc = ->
# return
id : 3
name : 'myname'