DEV Community

Discussion on: 14 Awesome JavaScript Array Tips You Should Know About

Collapse
 
jonrandy profile image
Jon Randy 🎖️

An easier way to copy an array:

const fruitsA = ["🍎", "🍌", "🍒"];
const fruitsB = [...fruitsA];
Enter fullscreen mode Exit fullscreen mode
Collapse
 
picwellwisher12pk profile image
Amir Hameed

I was also looking if this method is mentioned in the article.