ES6 Tutorial #9: Shallow vs Deep Copy| Interview Question| Modern Javascript 2021

ES6 Tutorial #9: Shallow vs Deep Copy| Interview Question| Modern Javascript 2021

Nisha Singla

2 года назад

14,537 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Parmar Suresh
Parmar Suresh - 03.05.2023 12:13

nice explanation ❤❤

Ответить
Mithun Kumar
Mithun Kumar - 16.04.2023 07:49

With the help of this JSON.parse(JSON.stringify(object)); you can easily achieve the deep copy

Ответить
rama devi
rama devi - 10.04.2023 15:04

your explanation is excellent

Ответить
Anup B
Anup B - 05.04.2023 13:39

Nicely explained..understand the concept well..just a confusion, Object.assign() is giving partial deep copy, JSON.stringify() also giving partial deep copy...and use of spread operator is giving complete deep copy...so my question is which method is giving shallow copy...is shallow copy same as just assigning one object to another object or something else?

Ответить
Tusarkanta Mallick
Tusarkanta Mallick - 26.09.2022 10:53

thank you, for clear explanation

Ответить
Anup B
Anup B - 17.08.2022 14:38

Thanks for this informative and easy to understand video..

Ответить
Shubham khilari
Shubham khilari - 10.08.2022 19:30

This is crisp 🫡🫡

Ответить
Kunal Rajput
Kunal Rajput - 17.07.2022 23:15

Well this was a deep explanation for my shallow js knowledge. Great video thanks

Ответить
saam
saam - 13.06.2022 10:29

Awesome Series :) (y)
..
In this case if I want to update Country in copied Object ?
I am trying to update in copiedvalue country value as 'US' (for example) , its creating a new key value with same pair .

Ответить
Adnan Soomro
Adnan Soomro - 03.03.2022 16:42

Very well explained.

Ответить
Neerukonda Sandhya
Neerukonda Sandhya - 27.02.2022 19:56

Awesome explanation mam

Ответить
gayathri g
gayathri g - 06.02.2022 02:47

Thanks.

Ответить
Rajesh kolluri
Rajesh kolluri - 18.01.2022 22:21

Thank you,Clean and clear explanation

Ответить
koti reddy
koti reddy - 18.12.2021 17:03

When to use shallow copy and deep copy ? Can you explain about this difference?

Ответить
Vivek Joshi
Vivek Joshi - 06.12.2021 23:42

Good explanation.✌️

Ответить
chandu Boddu
chandu Boddu - 23.11.2021 19:33

Awesome explanation , thank you so much

Ответить
Arpit Satyal
Arpit Satyal - 14.11.2021 22:43

You are amazing

Ответить
Fan of your Loginion
Fan of your Loginion - 28.10.2021 10:24

make video on json method

Ответить
Fan of your Loginion
Fan of your Loginion - 28.10.2021 10:14

how much javacsript we would learn to land a job as a frontend developer please help me its an emergency

Ответить
Cme
Cme - 01.10.2021 10:24

Nice voice. nice concept.

Ответить
Ehraz Ahmad
Ehraz Ahmad - 30.08.2021 03:20

Nice Explaination 👍.Good work👏.

Ответить
AkiraToriyama13
AkiraToriyama13 - 13.08.2021 16:54

Damn girl!! Those videos are super helpful!!!! Can't thank you enough!!!

Ответить
Anju Sreedharan
Anju Sreedharan - 04.08.2021 13:14

Your videos are really informative and we can understand the concepts very clearly. Please add videos on ngRx and cookies in angular

Ответить
Ganesh
Ganesh - 04.08.2021 09:43

Thank you 🙏

Ответить
APURVA KUMAR
APURVA KUMAR - 04.08.2021 06:34

i can able to do foe nested and simple objects
FOR EX-----
var obj = [{ x: 1 }, {y: 2}];
var deepCopy = _.cloneDeep(obj);
// Changing orignal value
obj[0].x = 10;

// Values after changing original value
console.log("After changing original value");

console.log("Original value ", obj);

console.log("Deep Copy value ", deepCopy);

OUTPUT

Original value [ { x: 10 }, { y: 2 } ]
Deep Copy value [ { x: 1 }, { y: 2 } ]

Ответить
APURVA KUMAR
APURVA KUMAR - 04.08.2021 06:28

thankyou mam for making my concept clear

Ответить
kalyani deshmukh
kalyani deshmukh - 03.08.2021 14:17

Thank you ma'am 😊

Ответить