I was wondering what was the most efficient way to rotate a JavaScript array.
I came up with this solution, where a positive n rotates the array to the
n
If your array is going to be large and/or you are going to rotate a lot, you might want to consider using a linked list instead of an array.