The Lua standard library provides two iterator functions that can be used with a for loop to traverse key-value pairs within tables.
To iterate over a sequence table we can use the library function ipairs.
for index, value in ipairs {'a', 'b', 'c', 'd', 'e'} do
print(index, value) --> 1 a, ...