If your array or array-like object is numeric, that is, if all its elements are numbers, then you can use Math.min.apply or Math.max.apply by passing null as the first argument, and your array as the second.
operator to spread an array and take the minimum or maximum element.
The following example uses a for loop
The following example uses Array.prototype.reduce() to find the minimum or maximum:
To generalize the reduce version we'd have to pass in an initial value to cover the empty list case: