I am working on a script that needs to determine which variable has the highest number in it. I have 6 variables, each is passed a value at run time and I need to determine which variable has the highest number in it.
Because of the amount of potential combinations (6! = 6*5*4*3*2*1 = 720), a straight comparison is out of the question. How should I go about this?
Math.max(5,10,15,20);would return 20