The usage of the reverse function in js
- 2020-03-30 01:07:37
The reverse() method is used to reverse the order of the elements in an array
Note: this method changes the original array instead of creating a new one.
Var STR = [' 1 ', '2', '3');
Document. The write (a);
Output: 3, 2, 1