![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to reverse the order of a JavaScript array?
To reverse the order of a JavaScript array, use the JavaScript array() method. JavaScript array reverse() method reverses the elements of an array. The first array element becomes the last and the last becomes the first.
Example
You can try to run the following code to reverse the order of a JavaScript array −
<html> <head> <title>JavaScript Array reverse Method</title> </head> <body> <script> var arr = c.reverse(); document.write("Reversed array is : " + arr ); </script> </body> </html>
Advertisements