Does this answer your question? [What is the difference between a shallow copy and a deep copy with JavaScript arrays?](https://stackoverflow.com/questions/24512712/what-is-the-difference-between-a-shallow-copy-and-a-deep-copy-with-javascript-ar)
– kmoserJun 11 '20 at 11:40
@mplungjan This question is not a duplicate of the one you set. OP is asking a question about pointer assignment and a shallow copy, not the difference between a deep and a shallow copy
– SeblorJun 11 '20 at 12:22
1
the code would not work anyway. the dupe explains all there is to know about assignment deep copy and shallow copy. There is not much else to be learned from this question - I can add more dupes if you are not happy
– mplungjanJun 11 '20 at 12:24
@mplungjan I agree that this question is a duplicate. However, as it seems OP is not used to StackOverflow, I think choosing a question closer to OP's is more appropriate, like this one : https://stackoverflow.com/questions/26745170/javascript-array-assign-issue
– SeblorJun 11 '20 at 12:27