Question: In JavaScript , create a function called MinMaxSum which holds an array of integers and report the sum of the lowest and the highest values
In JavaScript, create a function called MinMaxSum which holds an array of integers and report the sum of the lowest and the highest values in the array.
The output is the sum of the max and min values.
Example of the code:
function MinMaxSum (MyArray) {
// Insert code here;
}
MinMaxSum ([1,2,3,7]);
Output: 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
