I have several variables with some values assigned. For ex:
Gain_weight = 0.01 Gain_weather = 0.02
and some more like this. Now I want to get the variable name with highest value assigned.
When I do something like this It returns the value not the name.
var rootNode = Math.max(Gain_weight,Gain_smoking,Gain_exercising,Gain_foodhabits,Gain_parent_heartattack,
Gain_alcohol,Gain_occupation,Gain_workinghrs);
So instead of value how can I get the highest value assigned string?