- The spread operator copies all elements into a new empty object.
```javascript
while (num >= 1) {
newArr = [...arr]
num--;
}
```
- The code above will copy all of the elements into `newArr` but will also reinitialise `newArr` with every new iteration of the while loop.
- A new variable should first be initialised using the spread operator - `let obj = [...arr];` - then this variable should be added to the `newArr` for every iteration of the while loop.