js loop array backward

127

js loop array backward -

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

Comments

Submit
0 Comments