Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-19 18:51:03 +03:00
parent f0fbe0c3e5
commit 5e8e6f51a3
36 changed files with 97 additions and 82 deletions

View File

@ -3,9 +3,9 @@ title: filterNonUniqueBy
tags: array,intermediate
---
Filters out the non-unique values in an array, based on a provided comparator function.
Returns an array with the non-unique values filtered out, based on a provided comparator function.
- Use `Array.prototype.filter()` and `Array.prototype.every()` for an array containing only the unique values, based on the comparator function, `fn`.
- Use `Array.prototype.filter()` and `Array.prototype.every()` to create an array containing only the unique values, based on the comparator function, `fn`.
- The comparator function takes four arguments: the values of the two elements being compared and their indexes.
```js