Consider the following
var a = {foo: "bar"};
Equivalent to
var a = {};
a.foo = "bar";
Equivalent to
var a = {};
a['foo'] = "bar";
Equivalent to
var a = {}
var b = "foo";
a[b] = "bar";
Is it possible to do something like
var b = "foo";
var a = { [b]: "bar" };
Such that the result would be
// => {foo: "bar"}
Acceptable solutions are in JavaScript or CoffeeScript