Simon Høiberg on X: "JavaScript Tip 💡 Use the spread operator to quickly copy elements from an object or array to a new instance. No need to explicitly iterating and copying over
![JavaScript Object: Get a copy of the object where the keys have become the values and the values the keys - w3resource JavaScript Object: Get a copy of the object where the keys have become the values and the values the keys - w3resource](https://www.w3resource.com/w3r_images/javascript-object-exercise-16.png)
JavaScript Object: Get a copy of the object where the keys have become the values and the values the keys - w3resource
![A Deep Dive into Shallow Copy and Deep Copy in JavaScript | by Ayush Verma | JavaScript in Plain English A Deep Dive into Shallow Copy and Deep Copy in JavaScript | by Ayush Verma | JavaScript in Plain English](https://miro.medium.com/v2/resize:fit:1400/1*6NdX4JHxJEqjEc4C31KLsQ.png)