splice()

Warning

Use array.splice() instead.

Inserts a value or an array of values into an existing array. The first parameter specifies the initial array to be modified, and the second parameter defines the data to be inserted. The third parameter is an index value which specifies the array position from which to insert data. (Remember that array index numbering starts at zero, so the first position is 0, the second position is 1, and so on.)

उदाहरण

सिंटैक्स

splice(list, value, position)

पैरामीटर्स

list
Array:

Array to splice into

value
Any:

value to be spliced in

position
Integer:

in the array from which to insert data

Returns

Array: the list
This page is generated from the comments in src/utilities/array_functions.js . Please feel free to edit it and submit a pull request!

संबंधित संदर्भ