insert()

Inserts a value into an array at the given position.

This function is valid in v2.1.0 to v2.13.3. This function has been downloaded 37 times.

Parameters

{Array} array
Array into which a value will be inserted.
{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.
{*} value
Value to insert into array.

Returns

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