How to get first N number of elements from an array September 6, 2022 by Tarik To get the first n elements of an array, use const slicedArray = array.slice(0, n);