Answers for "how to duplicate an array"

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 "how to duplicate an array"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language