Understanding the "i" in 1.1



I completely understand the prime number testing method in 1.1 except for the bit of code below. To my eyes, since "i" is never defined (that I can see), how can it be used to divide the number being tested? What is the value of "i" in this section of code?

for i in 2..n-1
    if n % i == 0


Every number in the sequence 2, 3, 4... all the way to n-1. It starts with the first number, and i becomes that number, then it checks if n % i == 0, afterward it goes to the next number, and repeats the whole thing over again.


Gotcha. That makes sense. I think I'm still not totally familiar with for and in. Thanks.