Sorting and Testing for Unique Values : Sort : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Sort »

 

Sorting and Testing for Unique Values


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var aEmployees:Array = ["A""P""C""H"];
        if(aEmployees.sort(Array.UNIQUESORT!= 0) {
          trace(aEmployees.toString());
        }
        else {
          trace("Array has duplicate elements, and has not been sorted. ");
          trace(aEmployees.toString());
        }

    }
  }
}
// A,C,H,P

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Array
» Sort