Skip to content

ReadOnlyObservableCollection.slice

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions

Returns a new JavaScript Array containing the elements starting at the provided start index up to, but not including, the provided end index.

public slice(
  start?: number,
  end?: number
): TItem[]

Source reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:229.

Parameters

  • start: number
    The inclusive index at which to start the sub-array, accepts both positive and negative values.

  • end: number
    The exclusive index at which the sub-array ends, accepts both positive and negative values.

Returns: TItem[]

Returns a new array containing items from the provided start index up to the provided end index.

See also

Clone this wiki locally