Objects, references and mutation
How far a copy goes
A spread copies one level. Everything below it is still shared. · 10 minutes
`{ ...original }` makes a new object and copies each of the original's own properties into it. If a property held a number, the new object holds its own number. If it held an array, the new object holds the same way to reach the same array.
So the copy is real, and it is exactly one level deep.
`const b = { ...a }; b.name = 'x'; b.tags.push('y');` — which of `a`'s properties changed?