javascript array with limit code example Example: array.slice in typescript arr.slice([start[, end]])