when I have:
const foo = 1;
I can set a shorthand for object property names
const bar = {foo}
thats the same like
const bar = {foo: foo} // bar will be {foo: 1}
is there a shorthand when I have a const with an arrow function?
const foo = () => 1
i have to set it like this, but its uncool
const bar = {foo: foo()}
I would like to do it like this or something thats shorter
const bar = {foo()} //bar should be {foo: 1} but this will fail