tablica pętli wstecz javascript
let arr = [1, 2, 3];
arr.slice().reverse().forEach(x => console.log(x))
Friendly Hawk
let arr = [1, 2, 3];
arr.slice().reverse().forEach(x => console.log(x))
var arr = [1, 2, 3, 4, 5];
for (var i = arr.length - 1; i >= 0; i--) {
console.log(arr[i]);
}
var arr = [1, 2, 3, 4, 5];
for (var i = arr.length - 1; i >= 0; i--) {
console.log(arr[i]);
}
const array = ['blastoff', 1, 2, 3];
for (let index = array.length - 1; index >= 0; index--) {
const element = array[index];
console.log(element);
}
Run code snippet
var arr = [1, 2, 3, 4, 5];
for (var i = arr.length - 1; i >= 0; i--) {
arr[i]
}
var arr = [1, 2, 3];
arr.slice().reverse().forEach(function(x) {
console.log(x);
})