Holen Sie sich Top n -Objekte aus dem Listknoten Js

Just try this to get first n elements from list:

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