magical index variable .

magical index variable .

guys given the following code : 

Jquery : 

  1. $('div').each(function(i){

  2.     alert(i);

  3. });
and the following HTML code : 

  1. <div></div>
  2. <div></div>
  3. <div></div>
  4. <div></div>
  5. <div></div>
  6. <div></div>

      On document load .. and alert pops up 6 time .. everytime displaying a value which increments from 0 to 5 . 

now i have a confusion , nowhere in the Jquery code have i explicitly specified that i want the i (That i can be changed to "index" or even "bla" ) to be the current index of the elements , so why when i pass a variable in the function , does it act as the current index of the elements being iterated over ? 

Thank you. 

Gautam.