update snippets 32-47

This commit is contained in:
Stefan Feješ
2017-12-25 14:10:38 +01:00
committed by Agamemnon Zorbas
parent 3994e12792
commit 0001ff4dcb
16 changed files with 71 additions and 27 deletions

View File

@ -6,5 +6,8 @@ Use `Array.filter()` for an array containing only the unique values.
```js
const filterNonUnique = arr => arr.filter(i => arr.indexOf(i) === arr.lastIndexOf(i));
// filterNonUnique([1,2,2,3,4,4,5]) -> [1,3,5]
```
```js
filterNonUnique([1,2,2,3,4,4,5]) -> [1,3,5]
```