The variable i in the anonymous function declaration function(i) is the name used for the first parameter inside the function body. It does not correspond to any variable elsewhere in your page.
"i" is a temporary variable used to store the integer value of the current position in the range of the for loop that only has scope within its for loop. You could use any other variable name in place of "i" such as "count" or "x" or "number".