Javatpoint Logo
Javatpoint Logo

JavaScript TypedArray reverse() Method

The JavaScript reverse() method is used to reverse the array. The first element of the array becomes the last element of the array and vice versa.

Syntax:

Parameters:

No Parameters.

Return value:

Return the reversed original array.

Browser Support:

Chrome 1.0
Safari Yes
Firefox 1.0
Opera Yes

Example 1

JavaScript reverse() Method

Test it Now

Output:

4,5,2,1

Example 2

JavaScript reverse() Method

Test it Now

Output:

RDBMS,C++,C,Java





Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA