The array to be added to.
The item, or array of items, to add to the array.
Optionalindex: numberThe index in the array where the item will be inserted. Default 0.
Optionallimit: numberOptional limit which caps the size of the array.
Optionalcallback: FunctionA callback to be invoked for each item successfully added to the array.
Optionalcontext: objectThe context in which the callback is invoked.
Adds the given item, or array of items, to the array starting at the index specified.
Each item must be unique within the array.
Existing elements in the array are shifted up.
The array is modified in-place and returned.
You can optionally specify a limit to the maximum size of the array. If the quantity of items being added will take the array length over this limit, it will stop adding once the limit is reached.
You can optionally specify a callback to be invoked for each item successfully added to the array.