The two paragraphs before the paragraph that you quoted read as follows (bold text is mine):
for keyword signals that you are writing a loop. You next declare an iterator called
i that represents the current iteration of the loop. The iterator is constant within the body of the loop and only exists here; it is also managed for you by the compiler.
In the first iteration of the loop, its value is the first value in the range of the loop. Because you used
... to create an inclusive range of 1 through 5, the first value of
i is 1. In the second iteration, the value of i is 2, and so on. You can think of
i as being replaced with a new constant set to the next value in the range at the beginning of each iteration.
I think what is meant here is that
i is treated as a constant by the loop when it executes. So that’s probably what is meant by "as is the
let". It means that
i is a constant, so it’s as if it was created using the
let keyword rather than the
I think that it would be natural to assume that
i is a variable rather than a constant because we think of
i as changing each time the loop runs. And we all know that normally constants cannot change but variables can. But I suspect that the compiler implements things in a way that the loop runs like we have come to expect, despite
i being treated as a constant.
I’m making some guesses here, but that is my interpretation based on the two paragraphs I quoted.