Analyze the code.
The function's parameter + 2 is used as an index into the table. So, the constants start at -2 and go on to -1, 0, etc.
The maximum constant is 4, see there's a check for parameter + 2 > 6, or, equivalently, for parameter > 4. The number of elements in the table reflects that too.