0
Paralel array
How do you make a copy of an array, but when the first array has changes, the copy doesn't receive those? (Like, you remove an element from the first array but the copy doesn't get the element removed)
1 Answer
+ 1
var copiedArray = originalArray.slice();
Slice () clones the array with references
also one more way is iterating with loop
https://code.sololearn.com/Wxl8PLTurX7n/?ref=app