How to get the first n items in an array without slice or splice code example Example: first n elements of array js const sliced_array = unsliced_array.slice(0, n);