DEV Community

Discussion on: Two Ways to Rotate an Array in JavaScript

Collapse
pentacular profile image
pentacular

Another alternative is not to rotate the array, but to rotate the indices used to access the array.