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
I love web
I write here to learn, feel free to correct.
Markdown supported · ⌘↵ to post
No responses yet.