From 6f09033346444df1de55b17f36c68634d98bf071 Mon Sep 17 00:00:00 2001 From: Prabhat Kumar Sahu Date: Sun, 14 Oct 2018 11:15:54 +0530 Subject: [PATCH] Update use-the-spread-operator-to-evaluate-arrays-in-place.english.md --- ...spread-operator-to-evaluate-arrays-in-place.english.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md index ae037d8b2f..43bce73e63 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md @@ -63,6 +63,12 @@ console.log(arr2);
```js -// solution required +const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY']; +let arr2; +(function() { + "use strict"; + arr2 = [...arr1]; // change this line +})(); +console.log(arr2); ```