insert()

Inserts a value into an array at the given position.

This function is valid in v2.14.0. This function has been downloaded 7 times.

Parameters

{Array} array
Array into which a value will be inserted.
{*} value
Value to insert into array.
{number} position
Position at which to insert the value within array. A negative value will mean that the position is counted from the end of array. A position of -0 means that value will be added to the end of array.

Returns

{Array}
A reference to array. This is useful when chaining.

Required Function

This function requires the following function which is included automatically:

  • insertInto()
    Inserts a value into an array at the given position.