
Array.toString() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
453
value1, ...valuen
An optional list of one or more values to be added to array at index
startIndex after the specified elements have been deleted. If this list is
omitted, no elements are added.
Returns
A new array containing the deleted elements (the original array is modified separately to
reflect the requested changes).
Description
The splice() method removes the elements from array[startIndex] to array[startIndex +
deleteCount –1]
and then, optionally, inserts new elements starting at startIndex. The
splice( ) method does not leaves gaps in
array; it compacts deleted elements and moves
remaining elements as needed to ensure the contiguity of elements in the array.
Example
myList = new Array (1, 2, 3, 4, 5);
// Deletes the second and third elements from the list
// and inserts the elements "x", "y", and "z" in their place.
// This changes myList to [1, "x", "y", "z", 4, 5].
myList.splice(1, 2, "x", "y", "z");
See Also
Array.slice(); “The splice() Method,” in Chapter 11
Array.toString() Method
convert an array to a string of comma-separated element values
Flash 5
array.toString()
Returns
A comma-separated list of array’s elements, converted to strings.
Description
The toString() method creates a string representation of array. The string ...