The groupSizes global is a "sparse" array – that means there might be gaps in the numbering of it's elements. As such, it's recommended to use the forEach() method when iterating the array (see example below).
Example
Iterating through the groupSizes array...
groupSizes.forEach( function get(groupSize, groupID) {
// do stuff
} );
For Warzone 3.1, use groupSize() function instead (it also works on WZ 3.2+).