The options for the slice function.

interface IOptions {
    start?: number;
    step?: number;
    stop?: number;
}

Properties

Properties

start?: number

The starting index of the slice, inclusive.

Negative values are taken as an offset from the end of the array.

The default is 0 if step > 0 else n - 1.

step?: number

The step value for the slice.

This must not be 0.

The default is 1.

stop?: number

The stopping index of the slice, exclusive.

Negative values are taken as an offset from the end of the array.

The default is n if step > 0 else -n - 1.