Use the Array.NUMERIC constant with the sort( ) method to sort an array of numbers numerically : Sort : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Sort »

 

Use the Array.NUMERIC constant with the sort( ) method to sort an array of numbers numerically


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var scores:Array = [102145820196];
        scores.sort(Array.NUMERIC);
        trace(scores);   //2,5,6,8,10,14,19,20
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Array
» Sort