Question: using javascript 03. Write pseudocode for a single function called extremeValues. It takes 1 parameter, an array of integers (you do not need to validate

using javascript 03. Write pseudocode for a single function called extremeValues. Itusing javascript

03. Write pseudocode for a single function called extremeValues. It takes 1 parameter, an array of integers (you do not need to validate this). The function should return the minimum AND maximum values in the array. The standard approach for finding a minimum value in an array is to assume the first element (at index 0) is the current minimum. Then process the array repetitively from its second element to its last. On each iteration compare the current element being processed with the current minimum. If it's less than the minimum then set it as the current minimum. In this way at the end of processing the current minimum holds the minimum element value in the array. A similar process will work for finding the maximum. 04. Using your pseudocode from the previous task, now code your function so that it prints to the output area, the smallest and largest elements in the array. For example the following array: Var values = [4, 3, 6, 12, 1, 3, 8]; would show the following output: 12 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!