JavaScript Array reverse()
Description
The reverse()
method reverses the order of the elements in an array.
The reverse()
method overwrites the original array.
See Also:
Syntax
array.reverse()
Parameters
NONE |
Return Value
Type | Description |
Array | The array after it has been reversed. |
Array Tutorials:
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 |