Getting the Minimum or Maximum Element : Sort : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Sort »

 

Getting the Minimum or Maximum Element


 


package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var scores:Array = [104158];
        scores.sort(Array.NUMERIC);
        trace("Minimum: " + scores[0]);
        trace("Maximum: " + scores[scores.length - 1]);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Array
» Sort