A shallow copy of an object is a duplicate that may not be fully independent of the original, in the sense that any references / pointers it holds to other objects refer to the same objects that the original's do.
So I was reading an article to clone an object and array. All of them mentioned that Object.assign() can …
javascript arrays object copy shallow-copy