JS otrzymuje pewną liczbę elementów z tablicy

const slicedArray = array.slice(0, n);
Frantic Mylo