typescript slice of particular index start and end sap code example Example: array.slice in typescript arr.slice([start[, end]])