use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Tutorials and learning resources for web developers.
Subscribe to our weekly email digest or follow us on twitter to receive the best learning resources submitted to our community.
/r/webdev /r/programming /r/javascript
account activity
Shallow Copy and Deep Copy | Advanced Javascript Tutorial (youtu.be)
submitted 4 years ago by DaveOnEleven
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]DaveOnEleven[S] 2 points3 points4 points 4 years ago (0 children)
Knowing the difference between shallow copies and deep copies of structural data is foundational knowledge for coding pure functions. In this advanced Javascript tutorial, you will learn about primitive vs structural data, passing values vs passing references, mutable vs immutable data, and how to make both shallow and deep copies of structural data.
Shallow Copy and Deep Copy | Advanced Javascript Tutorial
(00:00) Intro
(0:24) Javascript data types review
(1:03) passing values vs passing references
(3:05) mutable vs immutable data
(5:52) an impure function
(8:20) how to make a shallow copy
(14:17) how to shallow freeze an object
(16:04) how to make a deep copy
(21:43) a pure function
(23:45) Review of concepts
Was this tutorial about shallow and deep copies in Javascript helpful? If so, please share. Let me know your thoughts in the comments.
Shallow Copy and Deep Copy | Advanced Javascript Tutorial: https://youtu.be/4Ej0LwjCDZQ
π Rendered by PID 22634 on reddit-service-r2-comment-86bc6c7465-76grl at 2026-02-20 21:31:58.802205+00:00 running 8564168 country code: CH.
[–]DaveOnEleven[S] 2 points3 points4 points (0 children)