update snippets 32-47

This commit is contained in:
Stefan Feješ
2017-12-25 14:10:38 +01:00
parent 823aa0c305
commit 62618883bf
15 changed files with 65 additions and 20 deletions

View File

@ -6,5 +6,8 @@ Use ES6 `Set` and the `...rest` operator to discard all duplicated values.
```js
const distinctValuesOfArray = arr => [...new Set(arr)];
// distinctValuesOfArray([1,2,2,3,4,4,5]) -> [1,2,3,4,5]
```
```js
distinctValuesOfArray([1,2,2,3,4,4,5]) -> [1,2,3,4,5]
```