Array (array) object-> reverse () method

1. Definition and usage

  The reverse () method is used to reverse the order of the elements in the array: reverse order.

  grammar:

    array.reverse()

  Examples:

var arr = [1,2,3,4,5];
console.log(arr.reverse());

  Output:

 

Guess you like

Origin www.cnblogs.com/abner-pan/p/12683204.html