Array.slice
slice — Copies a piece out of an array and returns it.
Description
Array.slice([integer begin, [integer end]])
Parameters
Name | Description | Type | Default | Optional |
---|---|---|---|---|
begin | integer | Yes | ||
end | integer | Yes |
Return values
The copied piece of the array.
Examples
Example #1 – slice example