insert
Updated on August 22, 2024Source codeTests
createInsert is a pipe that transforms an array to an array with a given item inserted at a given index.
Create insert
Call createInsert with these parameters to create your insert function:
Parameter
Type
Required
Description
itemany
yes
The item to insert.
indexnumber
yes
The index at which to insert the item.