Javascript Array and Object Cloning: Shallow or Deep?

Published: 15 April 2024
on channel: Jack Herrington
11,940
939

Should you clone objects and arrays shallow or deep? What is the difference and when does it matter? Let's dig into Javascript Array and Object cloning so that we can learn once and for all, why and when to use deep or shallow cloning.

👉 Upcoming NextJS course: https://pronextjs.dev
👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
👉 Discord server signup:   / discord  
👉 VS Code theme and font? Night Wolf [black] and Operator Mono
👉 Terminal Theme and font? oh-my-posh with powerlevel10k_rainbow and SpaceMono NF

0:00 Introduction
0:30 What does Cloning?
1:41 Primitive Values Copy
2:23 Array and Objects Clone
3:43 Shallow Cloning
4:16 Deep Cloning
6:31 Speed Comparision
7:15 Recommendations
8:00 Outroduction


Watch video Javascript Array and Object Cloning: Shallow or Deep? online without registration, duration hours minute second in high quality. This video was added by user Jack Herrington 15 April 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 11,940 once and liked it 939 people.