js slice out multiple parts of array code example Example: array.slice in typescript arr.slice([start[, end]])