Answers for "js array clone"

4

js array clone

let clone = [...myArray]
Posted by: Guest on June-24-2020
5

javascript duplicate an array

let arr =["a","b","c"];
// ES6 way
const duplicate = [...arr];

// older method
const duplicate = Array.from(arr);
Posted by: Guest on July-02-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language