0

How to reverse an element inside the array?

eg,- 11 21 32 43 output will be 43 32 21 11

9th Jul 2018, 9:26 AM
Sathish M
1 Respuesta
+ 4
Arrays have a .reverse() method... var arr = [1, 2, 3]; var reversed = arr.reverse(); // [3, 2, 1]
9th Jul 2018, 9:44 AM
TurtleShell
TurtleShell - avatar