slice()
slice(
start
): (end
) => <T
>(arr
) =>T
[]
Returns a new array containing elements between start
and end
(exclusive)
from the original array.
Parameters
start
number
The index to start at (inclusive).
Returns
Function
Parameters
end
number
Returns
Function
Type Parameters
• T
Parameters
arr
T
[]
Returns
T
[]
Remark
pure function
Example
slice(0)(4)([1, 2, 3, 4, 5, 6]);
// [1, 2, 3, 4]