How to reverse an array in javascript
Posted on January 8, 2023
We're lucky these days, there's a native method to reverse an array in javascript:
const arr = [1, 4, 7]
arr.reverse() // [7, 4, 1]
Posted on January 8, 2023
We're lucky these days, there's a native method to reverse an array in javascript:
const arr = [1, 4, 7]
arr.reverse() // [7, 4, 1]