title: Actionscript: compare variables from an array
body: <p>Need Help, I have totalA - totalB - totalC - totalD, need to select the highest variable from this 4 but if the highest one equal an other one, must show which variables equals. </p>
  
  <p>I have used this code but when it meets the equals ( A = B = C ) it dispalys just D</p>
  
  <pre><code>var aNumber:Array = new Array(totalA , totalB , totalC , totalD );
  
  for(var i:Number = 0; i &lt; aNumber.length; i++)
  {
      if(aNumber[i] &lt; aNumber[i+1]) 
      {
          bigger = aNumber[i+1];
      }
  }
  </code></pre>