We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc1e708 commit 63ac731Copy full SHA for 63ac731
challenges/collections-challenges.md
@@ -291,7 +291,7 @@ If an object is passed the object reference is copied to all the slots and not t
291
- Set is a data structure which does not allow duplicate elements
292
293
```js
294
-const set = new Set(...arr);
+const set = new Set(arr);
295
const distinctArr = [...set];
296
```
297
@@ -343,8 +343,8 @@ const itAvgSalaryGT10K = itTotalSalaryGT10K / itEmployeesWithSalaryGT10K.length;
343
- The union array will be the result if all the elements from the 2 arrays are picked
344
345
346
-const set1 = new Set(...arr1);
347
-const set2 = new Set(...arr2);
+const set1 = new Set(arr1);
+const set2 = new Set(arr2);
348
const distinctArr = [...set1, ...set2];
349
350
0 commit comments