Using destructuring to pick out elements is convenient, but we don't always want to pull out every element. A commonly useful pattern is to get the zeroth element of an array assigned to one variable, and the rest of the elements in another. This is commonly called the head and tail of an array.
In this recipe, we'll take a look at how to use the rest operator to get the head and tail of an array.