Let's say I have the following variables:
var num1 = 48;
var num2 = 420;
var num3 = 39;
And I want to know the max value, for that I use:
var max = Math.max(num1, num2, num3);
Is there a way to know that num2 was the max number? This example only has 3 variables, but let's say I have 20 or 500. I need to know the max value and its variable name in the most efficient way.