slice
Updated on August 22, 2024Source codeTests
createSlice
is a pipe that transforms an array to a sliced array.
Create slice
Call createSlice
with these parameters to create your slice
function:
Parameter
Type
Required
Description
from
number
yes
The index to start the slice from. A negative
from
will count back from the end of the array.to
number
yes
The index to slice to. The item at
to
will not be included in the sliced array. A negative to
will count back from the end of the array.