Inserting Elements into an Array: arrayName.splice(startingIndex, numberOfElementsToDelete, element1[,...elementN]);
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var aEmployees:Array = ["A", "P", "C", "H"];
aEmployees.splice(3, 0, "R", "H", "L");
trace(aEmployees.toString()); // A,P,C,R,H,L,H
}
}
}
Related examples in the same category