Determining the Size of an Array : Length : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Length »

 

Determining the Size of an Array


 


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


        var list:Array = [344557];
        trace(list.length);               // Displays: 3
        
        var words:Array = ["this""that""the other"];
        trace(words.length);              // Displays: 3
        
        var cards:Array = new Array(24);  
        trace(cards.length);              // Displays: 24

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Array
» Length