Appending Values to the End of an Array: The push() accepts one or more parameters and appends those values to the end of the array.
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var aEmployees:Array = ["A", "P", "C", "H"];
aEmployees.push("Ruth");
trace(aEmployees.toString());
}
}
}
Related examples in the same category