JS -Klonarray
const clone1 = [...array]
const clone2 = new Array(...array)
florinrelea
const clone1 = [...array]
const clone2 = new Array(...array)
numbers = [1, 2, 3];
numbersCopy = Array.from(numbers);
// [1, 2, 3]
let arr =["a","b","c"];
// ES6 way
const duplicate = [...arr];
// older method
const duplicate = Array.from(arr);
let clone = myArray.concat();