--- id: 587d7b89367417b2b2512b48 title: Use the Spread Operator to Evaluate Arrays In-Place challengeType: 1 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert(arr2.every((v, i) => v === arr1[i]), "arr2 is correct copy of arr1.");' - text: '' testString: 'getUserInput => assert(getUserInput("index").match(/\[\s*...arr1\s*\]/g),"... spread operator was used to duplicate arr1.");' - text: '' testString: 'assert((arr1, arr2) => {arr1.push("JUN"); return arr2.length < arr1.length},"arr2 remains unchanged when arr1 is changed.");' ```
## Challenge Seed
```js const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY']; let arr2; (function() { "use strict"; arr2 = []; // change this line })(); console.log(arr2); ```
## Solution
```js // solution required ```