Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Reverse the Order of an Array</title> </head> <body> <script> let counts = ["one", "two", "three", "four", "five"]; let reversed = counts.reverse(); document.write(counts + "<br>"); // Outputs: five,four,three,two,one document.write(reversed); // Output: five,four,three,two,one </script> </body> </html>