JavaScript Deep Copy vs. Shallow Copy

An image is worth a thousand words, a thousand and one when it is sample code. (Yes, poor joke!)

Simple assignment is pass-by-reference (shallow copy), Cloning […] is pass-by-value (deep copy)

One Reply to “JavaScript Deep Copy vs. Shallow Copy”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.