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 (JavaScriopt 1997) feature.
It is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |