Copies all elements of an Array into a new Array
Copy an Array
const array = [1, 2, 3];const copiedArray = copy(array);console.log(copiedArray); // [1, 2, 3]console.log(array === copiedArray); // false
a new Array containing all elements of the source Array
the Array element type
Generated using TypeDoc
Copies all elements of an Array into a new Array
Example
Copy an Array
Returns
a new Array containing all elements of the source Array