This is certainly the most confusing pair of function names. The only salvation I can offer is to remember one of the following two things:
- Shift can be thought of as "moving something around," and perhaps you can picture that if you "shift" an array around a bunch, something is liable to fall off the end (or in this case, the beginning). Unshift puts things back the way they were.
- It's the opposite of what it sounds like it should be.
unshift
sounds like undoing something, but in fact, it's putting something onto the array.
Good luck!