0
const a = new Map();
const construct = {
nome: 'Nome',
alguma: 'coisa'
}
a.set('Chave', construct);
const b = a.get('Chave');
b.alguma = 'outraCoisa'
console.log(a) // Mostra Map(1) { 'Chave' => { nome: 'Nome', alguma: 'outraCoisa' } }
There’s not exactly a problem, but I don’t know why this is happening and I also don’t know the right term to google and understand better, so if anyone can give me a brief explanation I would be very grateful