DEV Community

Discussion on: Reverse an Array Without .reverse() in JavaScript

Collapse
ttatsf profile image
tatsuo fukuchi

Another one:

array.reduce((acc, e)=>[e, ...acc], [])

Or :

array.reduceRight((acc, e)=>[...acc, e], [])