splice()

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
Notice any errors or typos? Please let us know. Please feel free to edit src/utilities/array_functions.js and open a pull request!

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