Добавить
Уведомления

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

In this video, I have explained in detail, how to copy javascript object and what is shallow and deep copy in javascript Shallow copy is also identified by pass by Reference , when you make a copy of original variable into another variable(copied) by using assignment operator(=), that time only the reference address of original variable is copied into another variable instead of original values. So at last both variables refer to the same value. So when you make any changes in new variable if will also mutate or change the original variable Deep Copy: Deep copy is also identified by pass by Value, when you make a copy of variable into another variable by using assignment operator, at that time all the values(object, arrays) along with reference address of original variable is copied into another variable. At last, both variables refer to different referenced values. So when you make any change in new variable it won't mutate the original variable. Watch video on spread operator:https://youtu.be/QzwKN1sQn5Y Watch video on mutable/immutable object : https://youtu.be/EieiM_mtPGg I have one assignment at the end of the tutorial. Please support my channel,? by showing your love❤️ by liking and sharing my video, so that I can reach to more people and can help them too. Watch my Angular playlist : Angular : https://www.youtube.com/watch?v=WSu-G0gk3Ks&list=PLC8OkhrVTHNHi6Do0etu_wMvAvjdjukQp Follow me: Facebook: https://www.facebook.com/AngularJS4Beginners LinkedIn: https://www.linkedin.com/in/nisha-singla-82407aa0/ Instagram : https://www.instagram.com/passion4code/ For more such interesting videos, please subscribe to my channel and stay connected. #javascript #NishaSingla

12+
16 просмотров
2 года назад
12+
16 просмотров
2 года назад

In this video, I have explained in detail, how to copy javascript object and what is shallow and deep copy in javascript Shallow copy is also identified by pass by Reference , when you make a copy of original variable into another variable(copied) by using assignment operator(=), that time only the reference address of original variable is copied into another variable instead of original values. So at last both variables refer to the same value. So when you make any changes in new variable if will also mutate or change the original variable Deep Copy: Deep copy is also identified by pass by Value, when you make a copy of variable into another variable by using assignment operator, at that time all the values(object, arrays) along with reference address of original variable is copied into another variable. At last, both variables refer to different referenced values. So when you make any change in new variable it won't mutate the original variable. Watch video on spread operator:https://youtu.be/QzwKN1sQn5Y Watch video on mutable/immutable object : https://youtu.be/EieiM_mtPGg I have one assignment at the end of the tutorial. Please support my channel,? by showing your love❤️ by liking and sharing my video, so that I can reach to more people and can help them too. Watch my Angular playlist : Angular : https://www.youtube.com/watch?v=WSu-G0gk3Ks&list=PLC8OkhrVTHNHi6Do0etu_wMvAvjdjukQp Follow me: Facebook: https://www.facebook.com/AngularJS4Beginners LinkedIn: https://www.linkedin.com/in/nisha-singla-82407aa0/ Instagram : https://www.instagram.com/passion4code/ For more such interesting videos, please subscribe to my channel and stay connected. #javascript #NishaSingla

, чтобы оставлять комментарии