Array Pattern: Accumulating State

Finding The Minimum In The Array

DIRECTIONS:

The code should set up a 'click event handler' using jQuery. Within the event handler, the program should create an array and then create local variables to store the location and value of the minimum value in the array.  The program will then go through the array, one element at a time.  If it finds that the current element is less that the previously seen minimum element it will update the location and value of the minimum element.

NOTE: There are several lines in the program where the order doesn't matter to JavaScript, such as declaring the local variables to store the location and value of the minimum element in the array - either one could go first in a valid program.  HOWEVER, because of how the Parsons problem library works, the lines need to be in EXACT SAME ORDER as the program I gave it. 
Because of this you may need to try swapping lines, until your program is identical to mine - sorry!