Posts by Kamila_Almeida • 26 points
1 post
-
1
votes1
answer47
viewsA: clone array functions and objects
The ideal would be to use the Operator spread (...): var array1 = [1,2,3] var clone = [...array1] The function that clones could be like this: function clonaArray(array){ var clone = [...array];…