User Guide

122 Chapter 2: ActionScript Language Reference
The following example creates an array and splices it using element index 1 for the start
parameter, the number 0 for the
deleteCount parameter, and the string chair for the value
parameter. This does not remove anything from the original array, and adds the string chair at
index 1:
var myFurniture_array:Array = new Array("couch", "bed", "desk", "lamp");
trace( myFurniture_array.splice(1,0, "chair" ) ); // displays empty array
trace( myFurniture_array ); // displays couch,chair,bed,desk,lamp