Consider the following
var a = {foo: \"bar\"};
Equivalent to
var a = {};
a.foo = \"bar\";
Equivalent to>
As others have said, no, there's currently no syntax for interpolated key strings in object literals in CoffeeScript; but it seems at some point this feature existed! In these GitHub issues there's some discussion about it: #786 and #1731.
It's implemented in Coco and LiveScript as:
b = 'foo'
a = {"#{b}": 'baz'}
# Or..
a = {(b): 'bar'}