Array Slicing

1 min read ·

Basic Slicing

Slicing extracts a portion of the array.

Start Stop Behavior

The slice starts from the start index and stops before the stop index.

Step Usage

The step value controls how elements are skipped.
Slicing returns a new array.