Common Mistakes[0]

Using the first element of an array without additional checks is a common mistake. The code above assumes that there is at least one element in things. Unfortunately, it doesn t do anything about the situation when this assumption is not true. The following fix (or something similar) is common: Despite the (most likely) intent of [ ]