
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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