Trying to retrieve the greatest and lowest values from an array that I know would only include numbers appears to be more difficult than I anticipated.
var numArray = [140000, 104, 99];
numArray = numArray.sort();
This should display 99, 104, 140000. Instead, it displays 104, 140000, and 99. So it appears that the sort is treating the data as strings.
Is there a method to have the sort function sort on integer values?