cables is under heavy development.
There might be one or another bug, please let us know about it!

op id:dbfd66dd-048e-4b36-a388-502fd36627cb
Extracts parts of an array (shallow copy)

summary (oneliner)


Input array: [1, 2, 3, 4, 5]

After calling Slice with Begin Index = 0 and End Index = 4: [1, 2, 3, 4]

Slice is a wrapper around the JavaScript slice function.


youtube id


Input Array (Array)

The array you want to slice

Begin Index (Number)

The index where the extraction should start. If Begin Index is negative it will extract elements from the end, e.g. when the Input Array is [1, 2, 3], calling Slice with Begin Index -1 will return 3

End Index (Number)

The index where the extraction should end (exclusive, so this one will not be included in the Output Array)


Output Array (Array)

A copy of the Input Array which only included values from Start Index until End Index (exclusive)


Caught a mistake or want to contribute to the documentation?

Edit this documentcancel save

Examples using ArraySlice

Public Patches using ArraySlice