Answers for "js for loop reverse arrayt"

C#
38

js loop array backwards

let arr = [1, 2, 3];
arr.slice().reverse().forEach(x => console.log(x))
Posted by: Guest on November-03-2021
8

how to reverse loop in javascript

const array = [6,7,8,9,10];
for (const number of array.reverse()) {
    console.log(number);
}
Posted by: Guest on March-25-2020
2

js loop array backwards

let arr = [1, 2, 3];

arr.slice().reverse().forEach(x => console.log(x))
Posted by: Guest on January-31-2022

C# Answers by Framework

Browse Popular Code Answers by Language