Slice

A part of an array, from a start index up to an end index.

Node id array/slice

The Slice node outputs a new array with the elements of array from index start up to, but not including, index end: on a, b, c, d, start 1 and end 3 give b, c.

Inputs

NameTypeDefaultNotes
arrayArray<T>—generic
startnumber0
endnumber—

Outputs

NameTypeNotes
arrayArray<T>generic

Behaviour

  • Defaults. start defaults to 0 (the beginning). end has no default: unset, the slice goes to the end of the array.
  • Like JavaScript's Array.slice. Negative indices count from the end (start -2 gives the last two elements). Indices past either end are limited to the array, and fractional ones are cut to whole numbers.
  • No errors. Where end is not after start, the result is empty.
  • The array is unchanged.
  • Pull, Shift and Pop: take out a single element.
  • Concat: joins arrays back together.
  • Filter: keeps elements by a test instead of by position.
© 2026 Wirepaint