The reverse() function of array object reverses the order of the elements of an array -- the first becomes the last, and the last becomes the first. Use it for example to reverse array elements.
Syntax
This will produce following result