Shallow Copy | Deep Copy |
---|---|
Original and shallow copy both point to the same memory location | Original and deep copy point to different memory locations |
Use ... spread operator: let shallowCopy = {...original} |
Use JSON : let deepCopy = JSON.parse(JSON.stringify(original)) |
Use Object.assign() : let shallowCopy = Object.assign({}, original) |
-
Notifications
You must be signed in to change notification settings - Fork 0
A collection of coding exercises and personal solutions to Exercism in JavaScript
ayohana/exercism-js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A collection of coding exercises and personal solutions to Exercism in JavaScript
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published