Define a function named Minimum that is similar to the Average function from Figure 17.11, but that

Question:

Define a function named Minimum that is similar to the Average function from Figure 17.11, but that takes an array of numbers as input and returns the smallest value from that array. For example, the call Minimum ([33, 12, 5, 17, 8]) should return 5. After inserting this function into your arrays.js page, modify your average.html page so that it displays the minimum input value along with the average.

[To find the minimum value in an array, your function should traverse the array and record the smallest value it encounters. Start by initializing a variable to the first value in the array. Then, compare each subsequent value in the array to the variable, updating the variable whenever a smaller value is found.]

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: