I need to pass information from array to another, in short, I want to copy the values of arrayPrimero to arraySegundo , but that the values can be changed without modifying the other, and I do not know how to do, I get error.
Code:
var arrayPrimero=[2,3,4,5]
var arraySegundo=[]
[2, 3, 4, 5] = []
Error:
Uncaught SyntaxError: Invalid destructuring assignment target
Is it possible to solve this?