const items = [1, 2, 3]; const reversedItems = items.map(item => item).reverse();
You just need to add .slice(0).reverse() before .map() array.slice(0).reverse().map(e => e.var)