Asignar clave y valor para objetar
function updateObjectWithKeyAndValue(object, key, value) {
return Object.assign({}, object, { [key]: value })
}
Proud Polecat
function updateObjectWithKeyAndValue(object, key, value) {
return Object.assign({}, object, { [key]: value })
}