Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 234 Bytes

arrayMin.md

File metadata and controls

10 lines (7 loc) · 234 Bytes

arrayMin

Returns the minimum value in an array.

Use Math.min() combined with the spread operator (...) to get the minimum value in the array.

const arrayMin = arr => Math.min(...arr);
// arrayMin([10, 1, 5]) -> 1