JavaScript Array reverse()
Definition and Usage
The reverse()
method reverses the order of the elements in an array.
The reverse()
method overwrites the original array.
Syntax
array.reverse()
Return Value
The array after it has been reversed. |
Browser Support
reverse()
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |