Creates a truncate operation that will remove all items after startIndex until the end of the array or the provided endIndex.
truncate
startIndex
endIndex
The start index for the truncate operation.
Optional
The end index for the truncate operation.
A truncate operation.
unset
const clearArray = truncate(0)const removeItems = truncate(3, 5) // Removes items at index 3, 4, and 5const truncate200 = truncate(200) // Removes all items after index 200 Copy
const clearArray = truncate(0)const removeItems = truncate(3, 5) // Removes items at index 3, 4, and 5const truncate200 = truncate(200) // Removes all items after index 200
Creates a
truncate
operation that will remove all items afterstartIndex
until the end of the array or the providedendIndex
.