JS Loop Array mundur
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))
let reverseArray = Arr=>{
let pushed =[];
for(let i = Arr.length -1; i >= 0; i--){
pushed.push(Arr[i]);
}
return pushed
}
const sentence = ['sense.','make', 'all', 'will', 'This'];
console.log(reverseArray(sentence))
// Should print ['This', 'will', 'all', 'make', 'sense.'];