Answers for "javascript reverse arry"

PHP
55

javascript reverse array

var arr = [34, 234, 567, 4];
print(arr);
var new_arr = arr.reverse();
print(new_arr);
Posted by: Guest on November-16-2019
1

reverse array in javascript

const reverseArray = arr => arr.reduce((acc, val) =>  [val, ...acc], [])
Posted by: Guest on September-19-2020

Browse Popular Code Answers by Language