min() / max()
Finds the smallest / largest value.
Syntax
min(a, b, ...) · max(arr)
Description
Provide multiple arguments or an arr (items, etc.); returns the smallest (min) or largest (max).
Returns
The smallest or largest element.
Example
Loading editor…
Expected output
2 7
When to use?
For finding the highest score or the lowest price in a list.