Javatpoint Logo
Javatpoint Logo

JavaScript Array reverse() method

The JavaScript array reverse() method changes the sequence of elements of the given array and returns the reverse sequence. In other words, the arrays last element becomes first and the first element becomes the last. This method also made the changes in the original array.

Syntax

The reverse() method is represented by the following syntax:

Return

The original array elements in reverse order.

JavaScript Array reverse() method example

Let's see an example to reverse the sequence of elements of the array.

Example

Test it Now

Output:

JQuery,Node.js,AngulaJS

Next TopicJavaScript Array





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA