Существует ли более короткий способ присвоения "неструктурированного" свойства объекту после объекта, инициализированного.
const a = 'foo';
const out = { a }; // this is during object initialization
// is there any similar shortcut to the above after out is initialized?
const b = 'bar';
// i'm looking for a streamlined alternative to the following line
out.b = b; // this works, but is there a shorter way to assign property b to object out?
// out { a: 'foo', b: 'bar', }