Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


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

Chapter 24. Core JavaScript Reference > Array.splice( ): insert, remove, or rep...

Array.splice( ): insert, remove, or replace array elementsECMAScript v3

Synopsis

array.splice(start, deleteCount, value, ...)

Arguments


start

The array element at which the insertion and/or deletion is to begin.


deleteCount

The number of elements, starting with and including start, to be deleted from array. Specify 0 to insert elements without deleting any.


value, ...

Zero or more values to be inserted into array, beginning at the index specified by start.

Returns

An array containing the elements, if any, deleted from array.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial