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