js loop array backward

123

js loop array backward -

let arr = [1, 2, 3];
arr.slice().reverse().forEach(x => console.log(x))

Comments

Submit
0 Comments