You can create copies of JavaScript objects by coping around properties e.g. const x = {foo: 123}; const y = { foo: x.foo }
. However doing this manually for deep objects can be time consuming. In this lesson we cover one way of deep copying simple objects in TypeScript.
Weird that this video is on egghead, teaching the worst way to do deep clone of an object and also it has nothing to do with Typescript at all.
Would it be wise to have this video showing this technique that is known to be an anti-pattern of deep cloning?