Update snippet descriptions
This commit is contained in:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user