DEV Community

loading...

Discussion on: 5 neat JavaScript tips

Collapse
matgott profile image
matgott

Destructuring isn't working "with reference". This could be confusing.

Objects in Javascript are mutables, so if you are destructuring an object which one of it properties is another object, the variable created for that property will point to the same object in the Heap.