Indexing arrays directly is relatively simple. The syntax is familiar to all but the most novice developers. However, what is also familiar is off by one error. This means that an array or a collection has been indexed incorrectly by a single position. In some cases, this will cause a fault that is immediately recognizable. Other times, it will cause more subtle errors.
In this recipe, we'll take a look at how to extract members of an array with destructuring syntax.