Yeah, totally agree. Arrays are very important in JS, and some of the subtle concepts in it are also very easy to get misunderstood. Like when someone wants to copy an array, even she/he uses the common array-copy operations, the original array can still be changed by changing the copied array. It is because the common array-copy operations are all shallow copy methods instead of deep copy methods.
I'm still very new with JS. The more I learn, the more I realize that JS is actually an easy-to-start but hard-to-master language. The flexibility it brings us also causes many quirky parts of the language. So now I try to relearn all of the fundamentals and hope I can be better at it in the future๐
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Andrew, thanks for the comment :)
Yeah, totally agree. Arrays are very important in JS, and some of the subtle concepts in it are also very easy to get misunderstood. Like when someone wants to copy an array, even she/he uses the common array-copy operations, the original array can still be changed by changing the copied array. It is because the common array-copy operations are all shallow copy methods instead of deep copy methods.
I'm still very new with JS. The more I learn, the more I realize that JS is actually an easy-to-start but hard-to-master language. The flexibility it brings us also causes many quirky parts of the language. So now I try to relearn all of the fundamentals and hope I can be better at it in the future๐