Let's discuss Deep and Shallow Clone in JavaScript
dev.to·13h·
Discuss: DEV
Flag this post

I want to give you a test, so you get the real reason you need to learn about Deep and shallow clone or copy and why we still need to have the understanding of immutable and mutability in JavaScript ready let’s go 😎

In previous article I discussed about mutability and immutability in JavaScript, if you’ve read the article kudus to you and if you haven’t, please check it out immutability and mutability in JavaScript because in this article I will be assuming you understand the concept of immutability and mutability in JavaScript and for those who have read it,

can you figure the output of the following snippet:

const fruits = ['apple', 'mango', 'banana']
const fruitsAndVeg = ['pinapple', 'peaches',['dodo', 'tomato' ]]
c...

Similar Posts

Loading similar posts...