When using delete on an item in an Array, the length property is not updated. : Dictionary : Array Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Array » Dictionary »

 

When using delete on an item in an Array, the length property is not updated.


 


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

        var pastas:Object = {t: 2, g: 14, s: 9};
        trace(pastas.length)// Displays 9
        delete pastas["s"];
        trace(pastas.length)// Displays undefined

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Array
» Dictionary