Translations:Extension:Scribunto/Lua reference manual/1448/en

except that the variables var, limit, and step are not accessible anywhere else. Note that the variable name is local to the block; to use the value after the loop, it must be copied to a variable declared outside the loop.