Skip to main content

Slice

This activity extracts a portion of elements from an array starting at a specified index and returns the selected segment.

Core Functions​

  • Accepts an existing array as input
  • Uses the provided start index to determine where slicing begins
  • Extracts the specified number of elements from the array
  • Returns the resulting subset as a new array

Inputs​

  • Array: Represents the array from which elements will be extracted
    Type: Array

  • Start: Specifies the starting index for the slice operation
    Type: Integer

  • Length: Specifies the number of elements to extract from the array starting at the given index
    Type: Integer

Outputs​

  • Output: Returns the extracted portion of the array
    Type: Array

Short Technical Summary​

An array manipulation activity that extracts a sequence of elements from the provided array using the specified start index and length, returning the selected segment as a new array.