Inserts values into an Array at the specified index
Insert values 4 and 5 at index 1
4
5
1
const array = [1, 2, 3];insertAt(1, 4, 5)(array);console.log(array); // 1, 4, 5, 2, 3
the Array element type
the index to insert the values
values
Rest
the values to insert
Generated using TypeDoc
Inserts values into an Array at the specified index
Mutation
Example
Insert values
4and5at index1