Given is an array of three numeric values and I\'d like to know the middle value of the three.
The question is, what is the fastest way of finding the midd
A lot of these seem to be using pretty complex if statements. I've found a really simple workaround using the Math library.
Math.max(Math.min(array[start], array[mid]), Math.min(array[start], array[mid], array[end]))
Works out quite nicely.