It doesn't mean either.
It is a variable containing a number that can be used as an index value for an array item. This is evidenced by the fact that i
is often used in the context of an array, as in
array[i]
The index value represents the number of the currently executing iteration. More specifically, the body of the loop (the instructions that are executed during each loop repetition) can be said to be iterated as the loop executes. If the item's index value is six, and an array is being iterated, then it's the seventh iteration (since array indices typically start counting at zero).
That said, there's no requirement that i
be used as an index in an array; it might be used in some other context. The notion of loop variables named i
, j
, k
, etc. originates in mathematics, where it is an established convention for writing subscripts. It was carried over from mathematics to programming in Fortran, where variables named i
through n
default to the integer
data type.