Obtenez les objets N TOP N à partir du nœud JS

Just try this to get first n elements from list:

const slicedList = list.slice(0, n);
Tomer Mantzuri