1var arr = [1, 2, 3, 4, 5];
2
3for (var i = arr.length - 1; i >= 0; i--) {
4 console.log(arr[i]);
5}
6
1var arr = [1, 2, 3, 4, 5];
2
3for (var i = arr.length - 1; i >= 0; i--) {
4 console.log(arr[i]);
5}
1const array = [6,7,8,9,10];
2for (const number of array.reverse()) {
3 console.log(number);
4}