Use for loop to loop through the dynamic array : For : Statement Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Statement » For »

 

Use for loop to loop through the dynamic array


 

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


        var info:Object = new Object(  );
        info.city = "Toronto";
        info.country = "Canada";
        
        for (var detailName:* in info) {
          trace(detailName);
        }
        
        for (var detailName:* in info) {
          trace(info[detailName]);
        }
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Statement
» For