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

This will iterate over the pairs ( 1, t[1] ), ( 2, t[2] ), and so on, stopping when t[i] would be nil.