Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-22 20:24:44 +03:00
parent 5cb69e3c5c
commit aa425812b4
40 changed files with 151 additions and 87 deletions

View File

@ -3,7 +3,7 @@ title: uniqueElementsByRight
tags: array,intermediate
---
Returns all unique values of an array, based on a provided comparator function, starting from the right.
Finds all unique values of an array, based on a provided comparator function, starting from the right.
- Use `Array.prototype.reduceRight()` and `Array.prototype.some()` for an array containing only the last unique occurrence of each value, based on the comparator function, `fn`.
- The comparator function takes two arguments: the values of the two elements being compared.