Easy Tutorial
❮ Prop Screen Availwidth Prop Week Readonly ❯

JavaScript reverse() Method

JavaScript Array Object

Example

Reverse the order of elements in an array:

fruits output result:


Definition and Usage

The reverse() method is used to reverse the order of elements in an array.


Browser Support

All major browsers support the reverse() method.


Syntax

Return Value

Type Description
Array The array with elements in reversed order

Technical Details

| JavaScript Version: | 1.1 | | --- | --- |


JavaScript Array Object

❮ Prop Screen Availwidth Prop Week Readonly ❯