Rotate an Array
Difficulty Rating: 2.5 / 5
See the Pen Rotate an Array by Fullstack Academy (@FullstackAcademy) on CodePen.
Click on a hint if you get stuck or review the solution.
Hint-1: Array Methods
There are various ways to manipulate an array. Two useful methods, especially for this problem is the [1,2,3].pop() (removes the last value in the array) and the [2,3].unshift(1) (adds a value to the front of the array) methods. Review their documentation
and try to find a way to use them in your solution (keep in mind, you don't HAVE to use them).