Why Do Weird Things Happen When I Clone Objects In JavaScript?
Sep 29, 2023 · 8 min read · We've all been there. You need to copy an array or an object into a new one in a new variable. It seems easy enough, just assign the first variable as the value of the second one. But then, when you start to mess with the copy, weird bugs show up, be...
Join discussion
