find min and max sum in array javascript code example
Example: how to return the max and min of an array in javascript
function minMax(arr) {
return [Math.min(...arr), Math.max(...arr)];
}
function minMax(arr) {
return [Math.min(...arr), Math.max(...arr)];
}