get a copy of elements array javascript code example
Example: javascript copy an array
let arr =["a","b","c"];
// ES6 way
const copy = [...arr];
// older method
const copy = Array.from(arr);
let arr =["a","b","c"];
// ES6 way
const copy = [...arr];
// older method
const copy = Array.from(arr);