Difficulty Rating: 2.5 / 5
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).