Uint16Array.prototype.slice

Returns a copy of a section of a typed array.

Syntax

slice(start?, end?)

Parameters

Return value

A new typed array.

Example

new Uint16Array([5, 6, 7, 8, 9]).slice(3)
Uint16Array [8, 9]