JavaScript Developer — Medium
Key points
- structuredClone(obj) creates a deep copy of the object
- Object.assign({}, obj) creates a shallow copy
- { ...obj } creates a shallow copy as well
- Object.create(obj) is used for prototypal inheritance
Ready to go further?
Related questions
