Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript loop through array backwards

const arr = [1, 2, 3];
const newArray = arr.slice().reverse().map(x => x);
console.log(newArray);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #loop #array
ADD COMMENT
Topic
Name
3+2 =