method ReadonlyArray.slice Private ReadonlyArray.slice(start?: number,end?: number,): T[] Returns a section of an array. Parameters optional start: number The beginning of the specified portion of the array. optional end: number The end of the specified portion of the array. This is exclusive of the element at the index 'end'. Return Type T[]