javascript reverse foreach code example
Example 1: how to reverse loop in javascript
const array = [6,7,8,9,10];
for (const number of array.reverse()) {
console.log(number);
}
Example 2: javascript reverse each string element in array
let noArray_leftOdd = ['0001101', '0011001', '0010011', '0111101'];
console.log(noArray_leftOdd.map(e => e.split("").reverse().join("")));