Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Copy : Clone A JavaScript Array

Shallow copy a one dimensional array with the spread operator

javascript
const originalArray = ['a', 'b', 'c', 'd']
const newArray = [...originalArray]

You can now change originalArray without changing newArray