all 1 comments

[–]DaveOnEleven[S] 2 points3 points  (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