Is there a short form of doing such operation:
function doObject(key, value){
let object = {};
return object[key] = value;
}
UPD: forget about function, I use it just to isolate scope and provide to params key and value. I don't need to implement the function but logic that it does