5 lines
158 B
JavaScript
5 lines
158 B
JavaScript
array_Clone = function(arra1) {
|
|
return arra1.slice(0);
|
|
};
|
|
console.log(array_Clone([1, 2, 4, 0]));
|
|
console.log(array_Clone([1, 2, [4, 0]]));
|