atribuir chave e valor ao objeto
function updateObjectWithKeyAndValue(object, key, value) {
return Object.assign({}, object, { [key]: value })
}
Proud Polecat
function updateObjectWithKeyAndValue(object, key, value) {
return Object.assign({}, object, { [key]: value })
}