The only explanation for this is that the array of elements contains values that are undefined, ie:
items = [undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined];
Both other answers are completely incorrect. The first parameter eachis the index, not the value, and jQuery.fn.each calls jQuery.each. There is no meaning between them.
source
share