Sorting Numerically : Sort : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Sort »

 

Sorting Numerically


 

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


        var aNumbers:Array = [1012152113333];
        aNumbers.sort();
        trace(aNumbers.toString());
        var aNumbers:Array = [1012152113333];
        aNumbers.sort(Array.NUMERIC);
        trace(aNumbers.toString());
    }
  }
}
1,10,13,15,2,21,3,33
1,2,3,10,13,15,21,33

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Array
» Sort