Clear an Array in Actionscript 3


I personally really like this way of clearing an array’s elements:

Declare your array to use:

var myArray:Array=new Array();

Add elements:

for (var i:Number;i<10;i++) {
  myArray[i] = "an item";
}

Clear the array: