• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Core Syntax > Array.splice()

Array.splice()

JavaScript 1.2+ Nav4+ Syntax

							array.splice(start,delete,arg3,…,argN)

Description

The splice() method provides a way for elements to be either added to or deleted from the array. When the delete parameter contains a number other than zero, the elements beginning at start and ending at index start+ending are deleted from the array. If delete is zero, no elements are deleted. All elements from start to the end of the array are deleted when delete is not specified. If arguments follow the delete parameter, they are added to the array as elements beginning at the position specified by start. Existing elements are shifted up to allow room for the new elements.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint