Format snippets

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-22 20:23:47 +03:00
parent 3936a1d3b8
commit aedcded750
70 changed files with 185 additions and 101 deletions

View File

@ -3,7 +3,7 @@ title: filterNonUniqueBy
tags: array,intermediate
---
Returns an array with the non-unique values filtered out, based on a provided comparator function.
Creates an array with the non-unique values filtered out, based on a provided comparator function.
- 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.