Removing Elements with the delete Operator : delete « Array « Flash / Flex / ActionScript






Removing Elements with the delete Operator

 


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

        var list = ["a", "b", "c"];
        trace(list.length);  // 3
        delete list[2];
        trace(list.length);  // 3

    }
  }
}

        








Related examples in the same category