DEV Community

CodeRecipe: How to reverse an array in JavaScript

Samantha Ming on August 19, 2019

Here's a Code Recipe to keep around if you need to reverse the order of the elements of an array. You can use the array method, "reverse()" ⏪ T...
Collapse
 
ogurinkaben profile image
Ogurinka Benjamin

I saw my name a lot here😁😁.

Collapse
 
samanthaming profile image
Samantha Ming

Lol, it’s a good name! Hopefully it’s just Benjamin and not Benjamin button 😂

Collapse
 
ogurinkaben profile image
Ogurinka Benjamin

Lol... just Benjamin😂😂😂

Thread Thread
 
samanthaming profile image
Samantha Ming

Phew! Cause I don’t think I know a doctor for that otherwise 😂

Collapse
 
realandersonca profile image
Real Anderson

Good Tips. Something New Learn Today.

Collapse
 
afozbek profile image
Abdullah Furkan Özbek

Hey Samantha,

I have a question: What is the runtime of Array.reverse() method ?

Thank you 😊

Collapse
 
mzahraei profile image
Ardalan

Good Tipps

Collapse
 
samanthaming profile image
Samantha Ming

Thanks! Glad you found it helpful 👏