Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-22 20:24:04 +03:00
parent aedcded750
commit d35575373f
41 changed files with 148 additions and 88 deletions

View File

@ -3,7 +3,7 @@ title: reduceWhich
tags: array,intermediate
---
Returns the minimum/maximum value of an array, after applying the provided function to set comparing rule.
Returns the minimum/maximum value of an array, after applying the provided function to set the comparing rule.
- Use `Array.prototype.reduce()` in combination with the `comparator` function to get the appropriate element in the array.
- You can omit the second parameter, `comparator`, to use the default one that returns the minimum element in the array.