var arr = [1, 2, 3, 4]; var arr1 = []; arr.forEach(element => { arr1.unshift(element) }); console.log(arr1);