Object passing js references and copy
what is happening let a= {b:{c:1}} undefined let b = {...a} undefined b.b.a = 2 2 b.b.c = 3 3 b and why
What’s happening is: {...a} makes only a shallow copy.
So here:
let a = { b: { c: 1 } }
let b
dheerajmalik.hashnode.dev3 min read