4 Replies Latest reply on Jan 8, 2009 1:34 PM by ericbelair

    What is the best way to get the minimum or maximum value from an Array of numbers?

    ericbelair Level 1
      Let's say I have an Array of numbers: [2,3,3,4,2,2,5,6,7,2]

      What is the best way to find the minimum or maximum value in that Array?

      Right now, to get the maximum, I am looping through the Array, and resetting a variable to the value if it is greater than the existing value: