JavaScript Developer — Medium
Key points
- Object.assign creates a shallow copy
- Changes to the copy do not affect the original object
- The value of obj.a remains 1
- The log statement outputs the value of obj.a
Ready to go further?
Related questions
JavaScript Developer — Medium
Key points
Ready to go further?
Related questions