JavaScript Interview - Q What is the difference between deep copy and shallow copy in JavaScript ?
HTML-код
- Опубликовано: 3 окт 2024
- 1. FULL JAVASCRIPT INTERVIEW COURSE(with PDF Book)
JavaScript Interview Masterclass: Top 200 Questions & Answer
Coupon code JSINTERVIEWHAPPY applied in below URL- 80% Discount
www.udemy.com/...
Don't worry if course not helping you, Udemy has 30 days Free Refund Policy.
2. QUICK REVISION BOOK (PDF format)
imojo.in/inter...
50% Discount Applied on above link.
Don't worry if book not helping you, I will return 100% of your money with in 7 days of purchase.
Just mail me at anuragrawat123@gmail.com.
All the best for your interviews.
Object.assign({},person) this will work if we dont have nested objects but where as for nested object we can use JSON.parse(JSON.stringify(person))
please explain with arrays also deep copy and shallow copy
nice and perfectly explained
Thank you so much 🙂
Functions inside objects are not working in deep copy, can you suggest deep copy with functions also should work
instead of Object.assign() can i use spread operator ???
and one more thing sir when i use this method but to change name only the value in copied object is changing why???
Awesome❤
Thanks @tvsnmurthy2370
Is it only for nested objects?
Nice 👍
Thanks ✌
2:46 got it