Answers for "Using the Unshift() Method to Reverse an Array"

0

Using the Unshift() Method to Reverse an Array

var arr = [1, 2, 3, 4];
var arr1 = [];
arr.forEach(element => {
    arr1.unshift(element)
});
console.log(arr1);
Posted by: Guest on April-09-2022

Code answers related to "Using the Unshift() Method to Reverse an Array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language